This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Patch for silent crash with Cygwin1.dll v 1.5.19-4
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: Cygwin Patches <cygwin-patches at cygwin dot com>
- Date: Thu, 2 Mar 2006 13:54:30 -0500
- Subject: Re: Patch for silent crash with Cygwin1.dll v 1.5.19-4
- References: <20060302181139.52070.qmail@web53004.mail.yahoo.com>
- Reply-to: cygwin-patches at cygwin dot com
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/thread.cc. The added the check below corrects this problem:
>
>CHANGELOG:
>2006-03-02 Gary Zablackis gzabl@yahoo.com
> * thread.cc (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.
cgf
>CVS DIFF FILE:
>Index: cygwin/thread.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v
>retrieving revision 1.196
>diff -u -p -r1.196 thread.cc
>--- cygwin/thread.cc 6 Feb 2006 18:24:06 -0000
> 1.196
>+++ cygwin/thread.cc 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))