-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 11/21/2009 10:11 AM: >> Here's three patches that add test cases, then respectively fixes cygwin >> 1.7 and 1.5 to pass the new tests. I've also tested that on platforms >> like Linux that the new tests pass, as well as testing that mingw skips >> the tests but otherwise still compiles fine. >> >> $ git pull git://repo.or.cz/libsigsegv/ericb.git master > > Thanks for this. You find a new libsigsegv tarball with your patches included > (with small modifications) in > http://www.haible.de/bruno/gnu/libsigsegv-2.8-pre1.tar.gz
I have confirmed that, with --enable-EFAULT, the latest libsigsegv.git passes on both cygwin 1.5 and 1.7. Without --enable-EFAULT, then a build of m4 1.4.12 on cygwin 1.5 with the latest libsigsegv still has the same bug that sparked this thread. I'm still not sure why anyone would ever use libsigsegv on cygwin without --enable-EFAULT, because this entire bug report was due to a fault that was both caused and handled internally by cygwin. I.e. there was no invalid pointer passed in by the application; rather, cygwin1.dll took a shortcut that the implicit fclose() during exit() could try to lock stdout, even though that attempt will fault if stdout has already been closed, and was gracefully handling the resulting fault until the point that libsigsegv interfered. EFAULT was one manifestation of how libsigsegv interfering with cygwin's fault handling caused observable behavior, but I won't go so far as to guarantee that EFAULT handling was the only observable behavior being changed by libsigsegv. In other words, I think it is wrong for libsigsegv to ever be compiled without --enable-EFAULT on cygwin, on the grounds that libsigsegv should not be second-guessing cygwin's fault handling. Instead, relying on POSIX signal handling for the cases where cygwin1.dll wants the fault exposed to the application is the only portable way for libsigsegv to fit in with cygwin's goal of being a POSIX emulation. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----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/ iEYEARECAAYFAksIwkUACgkQ84KuGfSFAYBocACeMK3BtJDO3RpfsUAnuW2o48E9 RTMAn18hH2MH9coc1GkOf6vpTSR2fcgc =ga1G -----END PGP SIGNATURE-----