Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Sun, 22 Apr 2001 23:13:52 +0200 From: Corinna Vinschen To: Corinna Vinschen Subject: Re: SHOWSTOPPER: [was Re: vfscanf in newlib] Message-ID: <20010422231352.U15499@cygbert.vinschen.de> Reply-To: Corinna Vinschen Mail-Followup-To: Corinna Vinschen References: <987861904 DOT 20126 DOT ezmlm AT sources DOT redhat DOT com> <3AE1C5B2 DOT B63F2B54 AT ece DOT gatech DOT edu> <20010422223317 DOT S15499 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010422223317.S15499@cygbert.vinschen.de>; from vinschen@redhat.com on Sun, Apr 22, 2001 at 10:33:17PM +0200 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 * 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.