Patch for silent crash with Cygwin1.dll v 1.5.19-4

Christopher Faylor
Sun Mar 5 00:49:00 GMT 2006

On Fri, Mar 03, 2006 at 09:13:53AM -0800, Gary Zablackis wrote:
>--- Christopher Faylor
><> wrote:
>>The "efault.faulted()" two lines above your change is supposed to catch
>>NULL dereferences.  I suspect that you were probably misled by the fact
>>that gdb might show a SEGV in this function but that is to be expected
>>(see lots of discussion in the cygwin mailing list about this) and
>>there are patches pending for gdb which will work around this behavior.
>>So, sorry, but I doubt that this is actually your problem.
>Actually, as far as I can see, the "efault.faulted()" does NOT catch
>the NULL dereference, unless it is confused about where to return.  If
>it did, the code I added should not stop my program from crashing.  I
>will go back and look into this further, though, to see if I have
>missed something.

You have missed how efault.faulted() is supposed to be operating and,
AFAICT, *does* operate throughout the Cygwin DLL.  It really is supposed
to be catching NULL dereferences.

It's possible of course, that there is something wrong with efault.faulted()
but that doesn't mean we need to extra code around efault.faulted.  It means
that efault.faulted needs to be fixed.

i.e., we need to fix the problem not the symptom.


More information about the Cygwin-patches mailing list