-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 12/6/2008 7:02 AM: > I have access to a MacOS X 10.5 machine. What happens in this test is that the > test program installs a SIGSEGV handler but then dies from a SIGBUS:
Thanks for the research and gnulib patch. However, m4 1.4.12 unconditionally installs a SIGBUS handler on platforms where SIGBUS is defined (C99 does not require SIGBUS, and mingw does not provide it), in order to print a nicer failure message rather than dump core. When libsigsegv is not in use, either I will have to modify m4 to also honor FAULT_YIELDS_SIGBUS and only install SIGBUS on platforms where c-stack is not already handling it, or we should consider making c-stack _always_ install a SIGBUS handler, even on platforms where stack overflow does not throw SIGBUS, and I modify m4 to not wipe out the c-stack handler by installing its own. In other words, it seems like we should consider modifying the contract of c-stack to state that the application should not modify SIGBUS handlers. On looking at libsigsegv, it looks like it also conditionally installs a SIGBUS handler. Which means we found a bug in m4 1.4.12: if you are using libsigsegv, and on a platform like MacOS, then my installation of a SIGBUS handler overwrites the libsigsegv handler, and you lose out on stack overflow detection. Also, if we modify the c-stack contract to always take care of SIGBUS, is there a way to make it detect whether libsigsegv installed a SIBGUS handler? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkk6mDUACgkQ84KuGfSFAYCeiwCfYTrwpM5cM96EnkxAmY6ZKYO0 PskAmwXpGe8phUHzWgRLkh2EnKg9MttM =l8NP -----END PGP SIGNATURE-----