[Bug middle-end/80710] Stack smashing detected in correct code depending on optimization flag
dr.markus.hoffmann at gmx dot de
gcc-bugzilla@gcc.gnu.org
Thu May 11 14:51:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80710
--- Comment #1 from dr.markus.hoffmann at gmx dot de <dr.markus.hoffmann at gmx dot de> ---
This example wants to show, that the optimizer destroys compatibility to the
ABI, either with optimizing something in the calling procedure (likely) or in
the called function. The same error happens, when test2 is in a .so library and
dynamically linked to the main program at runtime. Since the main program does
not know the function prototype at compile time it has to rely on calling it in
an ABI-compatible way.
More information about the Gcc-bugs
mailing list