Mail Archives: cygwin-developers/2001/04/22/17:13:59
On Sun, Apr 22, 2001 at 10:33:17PM +0200, Corinna Vinschen wrote:
> On Sat, Apr 21, 2001 at 01:38:58PM -0400, Charles S. Wilson wrote:
> > > On Sat, Apr 21, 2001 at 01:21:30AM -0400, Charles Wilson wrote:
> > > > I've just discovered that I get a coredump with all three when I try to
> > > > run ssh. #$!@&$
> > >
> > > I just build the latest from CVS and it's running fine, even ssh and
> > > sshd.
> > >
> > > Corinna
> >
> > Thank you. I guess that means the answer from my email is #3: I've
> > somehow lost the ability to build a working cygwin snapshot from a
> > perfectly good codebase. Funny, I don't remember the surgeon saying
> > "Ooops" during my recent brain surgery.... :-)
>
> Sorry Chuck, it seems I haven't tried to build from the latest sources.
> You're right, the latest code fails to run sshd. It dies with an access
> violation on each connect.
>
> I tracked it down to Robert's changes. Somewhere here:
> [...]
> * passwd.cc (getpwuid): Check for thread cancellation.
> (getpwuid_r): Ditto.
> (getpwname): Ditto.
> (getpwnam_r): Ditto.
The above four calls to pthread_testcancel() are the problem. I've
further tracked them down to the __pthread_testcancel() function.
The following patch solves the problem.
Robert? Chris? Ok to checkin?
Sun Apr 22 23:12:00 2001 Corinna Vinschen <corinna AT vinschen DOT de>
* thread.cc (__pthread_testcancel): Avoid using NULL thread
pointer.
Index: thread.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v
retrieving revision 1.26
diff -u -p -r1.26 thread.cc
--- thread.cc 2001/04/21 23:26:14 1.26
+++ thread.cc 2001/04/22 21:10:29
@@ -1069,7 +1069,7 @@ void
__pthread_testcancel (void)
{
class pthread *thread = __pthread_self ();
- if (thread->cancelstate == PTHREAD_CANCEL_DISABLE)
+ if (thread && thread->cancelstate == PTHREAD_CANCEL_DISABLE)
return;
/* check the cancellation event object here - not neededuntil pthread_cancel actually
* does something*/
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
- Raw text -