This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/57405] Using printf in signal handler with alternate stack generates a SIGSEGV
- From: "harald at gigawatt dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 May 2013 10:17:11 +0000
- Subject: [Bug libgcc/57405] Using printf in signal handler with alternate stack generates a SIGSEGV
- Auto-submitted: auto-generated
- References: <bug-57405-4 at http dot gcc dot gnu dot org/bugzilla/>
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.