mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-12 07:50:26 -07:00
copy-symbol: work around a bug in gcc
On x86_64, gcc 12.2.0 from debian 12 miscompiles the code we had previously. It generates code that copies symbol.macfun and symbol.sfdef using an aligned move SSE instruction which requires 16 byte alignment of its operand. This alignment is not present in general, leading to a segfault for instance when calling (copy-symbol t t). By reordering the assignments, we avoid triggering the bug.
This commit is contained in:
parent
d880e6f276
commit
ea5a10cbc1
1 changed files with 1 additions and 1 deletions
|
|
@ -335,12 +335,12 @@ cl_symbol_name(cl_object x)
|
|||
x->symbol.plist = cl_copy_list(sym->symbol.plist);
|
||||
x->symbol.undef_entry = sym->symbol.undef_entry;
|
||||
x->symbol.sfdef = sym->symbol.sfdef;
|
||||
x->symbol.macfun = sym->symbol.macfun;
|
||||
if (ECL_FBOUNDP(sym)) {
|
||||
x->symbol.gfdef = sym->symbol.gfdef;
|
||||
} else {
|
||||
ECL_FMAKUNBOUND(x);
|
||||
}
|
||||
x->symbol.macfun = sym->symbol.macfun;
|
||||
#ifdef ECL_THREADS
|
||||
x->symbol.binding = ECL_MISSING_SPECIAL_BINDING;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue