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 dynamic-link/16628] Segfault after a binary without pthread dlopen()s a library linked with pthread


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.


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