This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/18853] dynamically loading libpthread renders locked mutexes unusable
- From: "amonakov at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 02 Sep 2015 20:11:10 +0000
- Subject: [Bug nptl/18853] dynamically loading libpthread renders locked mutexes unusable
- Auto-submitted: auto-generated
- References: <bug-18853-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18853
--- Comment #4 from Alexander Monakov <amonakov at gmail dot com> ---
(In reply to Carlos O'Donell from comment #3)
> If you use pthread_* functions you must link with -lpthread. If you have
> another test case please provide that.
In my example libfoo.so would be using pthread_mutex_* without having
libpthread.so in DT_NEEDED. Provision of mutex stubs in libc.so appears to be
an endorsement of such usage (as already mentioned in libc-alpha thread, to let
library code use mutexes to protect internal data without bringing in full
libpthread.so into the process).
> > I hope I clarified the intent of the bugreport. Please reopen if you see
> > what I meant.
>
> That the glibc project should make it impossible to get this wrong? I agree.
> You should not be able to get into a situation where the stubs and real
> implementations get mixed across a single mutex. Was that your intent?
No: that stubs and real implementations should act on the mutex consistently
with each other in the event they get mixed.
--
You are receiving this mail because:
You are on the CC list for the bug.