This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/16628] Segfault after a binary without pthread dlopen()s a library linked with pthread
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 13 Jun 2014 08:09:04 +0000
- Subject: [Bug dynamic-link/16628] Segfault after a binary without pthread dlopen()s a library linked with pthread
- Auto-submitted: auto-generated
- References: <bug-16628-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16628
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Carlos O'Donell from comment #3)
> (In reply to Rich Felker from comment #2)
> > My understanding is that this usage is explicitly unsupported. However, if
> > that's the case, it should fail cleanly (with the error message in dlerror)
> > rather than crashing or exiting the program so I believe this bug report is
> > valid.
>
> My understanding was, and we have tests in the testsuite to test this, that
> dlopening libpthread is allowed. Why would we disallow this?
The pthread_mutex_init stub in libc.so.6 does nothing, so the mutex will
contain garbage. This works fine as long as only the stubbed version of
pthread_mutex_lock is used (which also does nothing). But the process will
crash once the stubs are replaced with the real thing because libpthread.so.0
has been loaded into the process.
--
You are receiving this mail because:
You are on the CC list for the bug.