From owner-freebsd-hackers Thu Jun 21 10:11:17 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.magmacom.com (mx1.magmacom.com [206.191.0.217]) by hub.freebsd.org (Postfix) with ESMTP id C0E2037B403 for ; Thu, 21 Jun 2001 10:11:13 -0700 (PDT) (envelope-from louisphilippe@macadamian.com) Received: from mail5.magma.ca (mail5.magma.ca [206.191.0.225]) by mx1.magmacom.com (8.9.3/8.9.3) with ESMTP id NAA06727; Thu, 21 Jun 2001 13:11:12 -0400 (EDT) Received: from durandal (mothership.macadamian.com [206.191.21.204]) by mail5.magma.ca (8.11.2/8.11.2) with SMTP id f5LHBC017838; Thu, 21 Jun 2001 13:11:12 -0400 (EDT) Message-ID: <0e5801c0fa75$1a6ccef0$2964a8c0@macadamian.com> From: "Louis-Philippe Gagnon" To: "Alfred Perlstein" Cc: References: <0db001c0fa62$2b567800$2964a8c0@macadamian.com> <20010621115423.U4543@sneakerz.org> Subject: Re: pthread/longjmp/signal problem Date: Thu, 21 Jun 2001 13:10:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [snip] > > ERRORS > If the contents of the env are corrupted, or correspond to an environment > that has already returned, the longjmp() routine calls the routine I interpreted that as referring to the case when we longjmp after the _function_ that called setjmp has returned, but yes, "resetjmping" is probably safer. > longjmperror(3). If longjmperror() returns the program is aborted (see > abort(3)). The default version of longjmperror() prints the message > ``longjmp botch'' to standard error and returns. User programs wishing > to exit more gracefully should write their own versions of > longjmperror(). > > > So the questions are : > > -Am I doing something obviously wrong? > > I think so, I think you must reinit the 'env' like so: > > reset: > if(sigsetjmp(env,1)) { > fprintf(stderr,"longjmp successful\n"); > goto reset; > } > Yes, I forgot to mention that in the things I tried. (since I never even get to the second longjmp() call, I dismissed that as a factor pretty early on) > > > > -Is this a bug? > > I think so, even with reinitializing the env structure it still hangs > for me as well: > [snip] > > > -Is this a known bug with a known workaround? > > Not that I know of, I'll take a peek at the threading libraries, but > I'm not promising anything. > Thanks! "anything" is probably more than I could find on my own... if it's a bug, it seems like a big one... I found it hard to believe that no one would have hit it yet (as I mentionned, I get the problem in both 4.2 and 4.3...) LPG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message