This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>, Torvald Riegel <triegel at redhat dot com>
- Cc: Martin Sebor <msebor at redhat dot com>, Rich Felker <dalias at libc dot org>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 08 Jun 2015 16:01:13 +0200
- Subject: Re: [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]
- Authentication-results: sourceware.org; auth=none
- References: <556B7F10 dot 40209 at redhat dot com> <556C31DE dot 4020803 at arm dot com> <556CA772 dot 2060207 at redhat dot com> <1433329427 dot 21461 dot 101 dot camel at triegel dot csb> <20150603191444 dot GM17573 at brightrain dot aerifal dot cx> <556F6012 dot 6090502 at redhat dot com> <1433404311 dot 21461 dot 231 dot camel at triegel dot csb> <20150608112755 dot GV12728 at redhat dot com>
On 06/08/2015 01:27 PM, Jonathan Wakely wrote:
> A disadvantage of returning void* is that if we do change what it
> returns then code using it still compiles and links. If we change it
> from returning pthread_xxx_t* to something else, or just remove it
> entirely, then code using it fails earlier, at compile-time.
C++ doesn't have implicit conversion from void * to pthread_mutex_t
etc., so existing code (which presumably doesn't have cast) would fail
to compile. I think.
--
Florian Weimer / Red Hat Product Security