I put an evaluation into the bug report: 6586967 Signal is sometimes not delivered on the alternate stack (although it should)
This is what I wrote The whole idea of deferring signals while a thread is in a critical region was introduced in Solaris 8, with the alternate libthread. The alternate libthread became the only libthread in Solaris 9. libthread was folded into libc in Solaris 10. The unfortunate side-effect of taking a deferred signal is that is is taken on the main stack, not on the alternate stack (if active). There is no particular problem with this behavior for asynchronously-generated signals. The case of a synchronously-generated signal (SIGSEGV for example) "cannot happen" because critical regions only occur within libc and libc does not fail in this way (modulo undiscovered bugs, of course). The alternate stack was invented for processes that exhaust their stack and incur SIGSEGV as a result. It was not invented for normal signals. That said, this is still an interface violation and should be fixed. The complexity is how to ensure that the original siginfo structure gets passed to the signal handler when a deferred signal is taken, together with correct sigaltstack information. Requires a bit of work... Roger Faulkner Sun Microsystems This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
