public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12561] New: ld.so: dlclose() can remove required local scope elements of NODELETE linkmaps
@ 2011-03-10  2:20 pasky at suse dot cz
  2011-03-22  1:41 ` [Bug libc/12561] " pasky at suse dot cz
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pasky at suse dot cz @ 2011-03-10  2:20 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12561

           Summary: ld.so: dlclose() can remove required local scope
                    elements of NODELETE linkmaps
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: pasky@suse.cz


Created attachment 5283
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5283
proposed patch, incl. testcase

In case a library is opened with RTLD_LOCAL, dlclose()ing that library
will remove the local scope from all subsequently loaded libraries
unconditionally, even though such a library is marked as RTLD_NODELETE.
This causes subsequent lookups within that library to fail if the
library depends on other libraries than those already loaded within
the global scope.

This has been exposed in a real-world case where libproxy opens
a KDE4 plugin with RTLD_LOCAL, the plugin depends on libkde4_core
and libkde4_core is marked as NODELETE due to having a STB_GNU_UNIQ
symbol; the plugin is dlclose()d later but ld.so raises a fatal
error when libkde4_core global destructor is called (it depends
on libqt4, but libqt4 has been in the plugin's local scope only
and is gone now).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-06-27 13:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10  2:20 [Bug libc/12561] New: ld.so: dlclose() can remove required local scope elements of NODELETE linkmaps pasky at suse dot cz
2011-03-22  1:41 ` [Bug libc/12561] " pasky at suse dot cz
2011-04-10 20:02 ` drepper.fsp at gmail dot com
2011-05-25 15:16 ` matz at suse dot de
2011-05-25 19:29 ` aj at suse dot de
2012-02-21  2:10 ` [Bug ld.so|libdl/12561] " jsm28 at gcc dot gnu.org
2012-03-30 14:13 ` [Bug dynamic-link/12561] " idoenmez at suse dot de
2012-10-23 17:34 ` ldv at altlinux dot org
2012-10-25 14:08 ` matz at suse dot de
2012-10-25 17:14 ` schwab@linux-m68k.org
2012-11-28 10:46 ` schwab@linux-m68k.org
2014-06-27 13:46 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).