This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/18435] pthread_once hangs when init routine throws an exception
- From: "msebor at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 20 May 2015 14:45:44 +0000
- Subject: [Bug nptl/18435] pthread_once hangs when init routine throws an exception
- Auto-submitted: auto-generated
- References: <bug-18435-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18435
--- Comment #3 from Martin Sebor <msebor at redhat dot com> ---
Thanks for the reference to the POSIX issue. I admit I was initially also
skeptical that this use case was intended to be supported by POSIX but became
convinced after reading the following quotes from the spec:
http://permalink.gmane.org/gmane.comp.lib.boost.devel/128855
It seems clear that POSIX not only intends to support such a use case (of
pthread_cleanup_push/pop) but even encourages exception-aware implementations
(referring to them as "the ideal solution").
With that in mind, though, I'm starting to think that a better solution than
the one proposed in my patch is actually to change pthread_cleanup_push/pop to
be usable with exceptions (i.e., in C code that calls into C++ code that
throws).
--
You are receiving this mail because:
You are on the CC list for the bug.