[Bug libgcc/57405] Using printf in signal handler with alternate stack generates a SIGSEGV
harald at gigawatt dot nl
gcc-bugzilla@gcc.gnu.org
Sat May 25 10:17:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57405
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #5 from Harald van Dijk <harald at gigawatt dot nl> ---
Turn on warnings. This has nothing to do with calling printf inside a signal
handler, this is because no declaration of strsignal is provided, so strsignal
is implicitly declared as returning int instead of char *. You're on a 64-bit
system where they don't have the same size, so this breaks badly. Appropriate
warnings for this get enabled even in GCC 4.4 with -Wall.
More information about the Gcc-bugs
mailing list