This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/18435] pthread_once hangs when init routine throws an exception


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]