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

            Bug ID: 57405
           Summary: Using printf in signal handler with alternate stack
                    generates a SIGSEGV
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jkf at research dot att.com

Created attachment 30185
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30185&action=edit
requested bug information and gdb session showing failure

When using several printf's in a sigaction signal handler and alternate stacks
generates a SIGSEGV:
Program received signal SIGSEGV, Segmentation fault.
0x0000003b8ce480ac in _IO_vfprintf_internal (s=<value optimized out>,
    format=<value optimized out>, ap=<value optimized out>) at vfprintf.c:1641
1641              process_string_arg (((struct printf_spec *) NULL));

This is independent of the size of the alternate signal stack. I have tried it
with 4 * SIGSTKSZ and same error at same line when alternate signal stack is is
SIGSTKSZ (8k).

Attached is file with requested information and output of gdb debug session of
program execution.

Reply via email to