[Bug target/35271] Stack not aligned at mod 16 byte boundary in x86_64 code

matz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 24 19:51:00 GMT 2008



------- Comment #17 from matz at gcc dot gnu dot org  2008-02-24 19:50 -------
Honza: No recursion is involved here.  I guess (Tege: correct me if I'm wrong)
that already the first call to __gmp_mt_recalc_buffer() from
__gmp_randget_mt() will segfault, as the first call obviously will end up
in the dynamic linker, and that one wants to have $rsp aligned on 8 mod 16.

But I wonder how that could happen.  After all the __gmp_randget_mt function
is global, not local, and can be overridden, so why would GCC assume that
just because it knows its body it can ignore the usual alignment requirements
for global functions?

Is it possible that the darwin support in GCC determines that randget_mt
is a local function (perhaps because MACH-O doesn't allow symbol interposition
like ELF does)?  In that case we can't do this optimization in the darwin
case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35271



More information about the Gcc-bugs mailing list