From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/864 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Hi and a few questions Date: Sun, 20 May 2012 17:20:08 -0400 Message-ID: <20120520212008.GB163@brightrain.aerifal.cx> References: <1753849.ANqesc5nEP@main.pennware.com> <20120520175316.GC17860@port70.net> <3093865.QEH9na1OAA@main.pennware.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1337549130 12224 80.91.229.3 (20 May 2012 21:25:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 May 2012 21:25:30 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-865-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 20 23:25:29 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SWDd2-0003SL-HV for gllmg-musl@plane.gmane.org; Sun, 20 May 2012 23:25:28 +0200 Original-Received: (qmail 10128 invoked by uid 550); 20 May 2012 21:25:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 10120 invoked from network); 20 May 2012 21:25:27 -0000 Content-Disposition: inline In-Reply-To: <3093865.QEH9na1OAA@main.pennware.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:864 Archived-At: On Sun, May 20, 2012 at 03:44:24PM -0500, Richard Pennington wrote: > On Sunday, May 20, 2012 07:53:16 PM Szabolcs Nagy wrote: > [snip] > > "conformance/interfaces/pthread_key_create/1-2.c:44: error: control reaches > > end of non-void function" there are a couple of similar bad tests > > This one might be real. I think the declaration of > > void pthread_exit(void *); > > should be > > void pthread_exit(void *) __attribute__ ((__noreturn__)); > > for gcc and clang. Does musl allow this type of attribute usage? I don't see > many attributes used in the header files. In principle I'm not opposed to adding attributes under #ifdef __GNUC__ when they have clear benefits to the generated code. If exit functions are such a case, I would consider it. However, on the uClibc list it was noted that the noreturn attribute makes WORSE code from a debugging standpoint by making it impossible to backtrace an exit in the debugger (which can be useful when there's a breakpoint or crash in an atexit or pthread cleanup function). Also, while POSIX does not permit conforming applications to do this, musl allows longjmp out of cleanup handlers (which might have been invoked via pthread_exit or cancellation) and uses this allowance internally in the POSIX timer code (to allow reuse of the timer thread for realtime robustness, i.e. no danger that a thread cannot be created). Rich