gen-num-limits runs forever on GNU/Linux/sparc (Red Hat Linux 6.2)

Alexandre Oliva aoliva@redhat.com
Tue Jan 30 23:27:00 GMT 2001


The problem is that longjmp shouldn't generally be used to return from
a signal, because it doesn't necessarily restore the blocked-signals
mask.  So, after the first trap longjmp()s out of the signal handler,
SIGFPE is blocked, and the second trap is never delivered.  This patch
arranges for us to use sigsetjmp if available, falling back to
setjmp/longjmp otherwise.  According to the GNU/Linux man-pages,
setjmp/longjmp would save the signal mask on BSD4.3, but not on SysV,
so it's probably ok to use it if sigsetjmp is not available.

Tested on sparc-unknown-linux-gnu, with and without -DHAVE_SIGSETJMP.
The latter compiled, but would never complete, as before.  Ok to
install?



More information about the Libstdc++ mailing list