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/18853] dynamically loading libpthread renders locked mutexes unusable


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.


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