summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-20 00:41:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-20 00:41:52 -0700
commit09df9c9efbeb7aa361bfebb8e59e1b71754e4b63 (patch)
tree1d96491f3f5578520afa9fd602026d8a71874a7f /eval.c
parenta076a86743b89300fe89a92192c7570a5a1c2dba (diff)
downloadtxr-09df9c9efbeb7aa361bfebb8e59e1b71754e4b63.tar.gz
txr-09df9c9efbeb7aa361bfebb8e59e1b71754e4b63.tar.bz2
txr-09df9c9efbeb7aa361bfebb8e59e1b71754e4b63.zip
ffi: bugfix: clone of type points to old self.
* ffi.c (ffi_type_copy, ffi_type_copy_new_ops): The cloned txr_ffi_type structure must have a self member which points to the new cobj, not the original one. Otherwise things are inconsistent. For instance if the clone is being made for the purposes of adjusting alignment, any operation which chases the self pointer will be accessing incorrect attributes. One example of this is (alignof foo.bar) where if bar is the clone of a type, this will incorrectly report the alignment of the original from which bar was cloned, and the original alignment, not the adjusted alignment is reported.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions