This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42679] RTLD_DEEPBIND dlopen option for shared library that uses libstdc++ std::ostream crashes
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 22:07:14 -0000
- Subject: [Bug libstdc++/42679] RTLD_DEEPBIND dlopen option for shared library that uses libstdc++ std::ostream crashes
- References: <bug-42679-13845@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from jakub at gcc dot gnu dot org 2010-01-28 22:07 -------
The theoretical example is libstdc++ defining some object where things
misbehave if it is not the only one (say foo) and some other library has that
object as well. When that other library isn't an direct or indirect dependency
of the executable, but libstdc++ is, in all libraries loaded before start of
the program foo resolves to the libstdc++ copy. When you dlopen RTLD_DEEPBIND
this other library, foo in it and all its dependencies will resolve to the
other library, as it comes earlier in the search scope, before global scope.
I guess LD_DEBUG=all could shed some light into what exactly is going on, it
could be the empty string, or something similar.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42679