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

Christopher Faylor
Thu Mar 2 18:54:00 GMT 2006

On Thu, Mar 02, 2006 at 10:11:39AM -0800, Gary Zablackis wrote:
>Since installing Cygwin1.dll v 1.5.19-4, I have a problem with the
>computer algebra system SAGE dying at startup with no error messages
>(i.e.  I get returned to the bash prompt with no messages of any sort).
>I tracked the problem down to verifyable_object_isvalid() in
>winsup/  The added the check below corrects this problem:
>2006-03-02 Gary Zablackis
> * (verifyable_object_isvalid): check for
>NULL object or reference

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.


>Index: cygwin/
>RCS file: /cvs/src/src/winsup/cygwin/,v
>retrieving revision 1.196
>diff -u -p -r1.196
>--- cygwin/    6 Feb 2006 18:24:06 -0000     
> 1.196
>+++ cygwin/    2 Mar 2006 18:06:50 -0000
>@@ -122,6 +122,9 @@ verifyable_object_isvalid (void
>const *
>   if (efault.faulted ())
>     return INVALID_OBJECT;
>+  if(!object || !*object)
>+     return INVALID_OBJECT;
>   if ((static_ptr1 && *object == static_ptr1) ||
>       (static_ptr2 && *object == static_ptr2) ||
>       (static_ptr3 && *object == static_ptr3))

More information about the Cygwin-patches mailing list