Hash :
4b3bf87e
Author :
Date :
2025-01-06T01:16:11
sigsegv tests: Work around a longjmp bug on GNU/Hurd. * tests/test-sigsegv-catch-stackoverflow1.c (_FORTIFY_SOURCE, __USE_FORTIFY_LEVEL): Undefine, as a workaround to the Hurd longjmp bug. * tests/test-sigsegv-catch-stackoverflow2.c (_FORTIFY_SOURCE, __USE_FORTIFY_LEVEL): Likewise. * doc/posix-functions/longjmp.texi: Document the Hurd bug.
@node longjmp
@subsection @code{longjmp}
@findex longjmp
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/longjmp.html}
Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
The effects of this call are system and compiler optimization dependent,
since it restores the contents of register-allocated variables but not
the contents of stack-allocated variables.
@item
When longjumping out of a signal handler that was being executed on an
alternate stack (installed through @code{sigaltstack}),
on Hurd, FreeBSD, NetBSD, OpenBSD,
you need to clear the @code{SS_ONSTACK} flag in the @code{stack_t}
structure managed by the kernel.
@item
This function may crash when the invoker code was compiled with option
@code{-D_FORTIFY_SOURCE=2},
@c https://sourceware.org/bugzilla/show_bug.cgi?id=32522
on Hurd.
@end itemize