Eric Blake <ebb9 <at> byu.net> writes: > This example flushes out the libsigsegv interaction for both cygwin 1.5 and > today's CVS cygwin 1.7.
Given that I have proven a case where cygwin relies on internal fault handling for more than just EFAULT, and that correct program behavior is broken if libsigsegv built without --enable-EFAULT interferes, how about this patch? From: Eric Blake <e...@byu.net> Date: Tue, 24 Nov 2009 09:35:41 -0700 Subject: [PATCH] Flip default of --enable-EFAULT. * configure.ac: Default --enable-EFAULT to on. * README: Tweak wording accordingly. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 6 ++++++ README | 8 ++++---- configure.ac | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2eb27a6..5892dec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-24 Eric Blake <e...@byu.net> + + Flip default of --enable-EFAULT. + * configure.ac: Default --enable-EFAULT to on. + * README: Tweak wording accordingly. + 2009-11-21 Eric Blake <e...@byu.net> Bruno Haible <br...@clisp.org> diff --git a/README b/README index 86671eb..06db747 100644 --- a/README +++ b/README @@ -119,10 +119,10 @@ Installation instructions on Woe32: Configuration options: - - If the option --enable-EFAULT is given, libsigsegv will try to arrange - that passing invalid memory adresses to system calls (such as read(), - write(), etc.) makes the system call fail with errno = EFAULT, rather than - invoking the signal handler. POSIX does not specify the behaviour of + - If the option --disable-EFAULT is given, libsigsegv will try to intercept + invalid memory adresses to system calls (such as read(), write(), etc.) + and invoke a handler, even if the system call would otherwise fail with + errno = EFAULT with no signal. POSIX does not specify the behaviour of system calls in this case (see <http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, under "[EFAULT]" and under "Memory Protection"). Therefore correct diff --git a/configure.ac b/configure.ac index 20380b8..3c75949 100644 --- a/configure.ac +++ b/configure.ac @@ -946,7 +946,7 @@ AC_ARG_ENABLE([EFAULT], enable_EFAULT=no fi ], - [enable_EFAULT=no]) + [enable_EFAULT=yes]) AC_MSG_RESULT([$enable_EFAULT]) if test $enable_EFAULT = yes; then AC_DEFINE([ENABLE_EFAULT], [1], -- 1.6.4.2