[Bug hurd/24110] SS_DISABLE never set in stack_t value returned by sigaltstack
bruno at clisp dot org
sourceware-bugzilla@sourceware.org
Sun Jan 20 17:23:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=24110
--- Comment #7 from Bruno Haible <bruno at clisp dot org> ---
This is not the only effect, after all.
When a signal has a handler set with SA_ONSTACK, and the thread is freshly
initialized and then the signal is raised, the program will crash.
How to reproduce: Run the attached program use-initial-alternate-stack.c. It
succeeds on Linux, but crashes (with 'Illegal instruction') on Hurd.
How come? Look at glibc/sysdeps/mach/hurd/i386/trampoline.c line 80
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
Here a consequence of the missing SS_DISABLE flag upon initialization is that
this code will attempt to switch to the alternate signal stack, placing a stack
frame just below address 0x00000000.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list