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: "maemarcus at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Dec 2016 16:23:15 +0000
- Subject: [Bug libstdc++/42679] RTLD_DEEPBIND dlopen option for shared library that uses libstdc++ std::ostream crashes
- Auto-submitted: auto-generated
- References: <bug-42679-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42679
maemarcus at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maemarcus at gmail dot com
--- Comment #23 from maemarcus at gmail dot com ---
FWIW, I came across this issue with SEGFAULT in cerr on g++ 4.8.5.
Interestingly, cout in the same time works fine. Got resolved either by
removing RTLD_DEEPBIND, or by adding -static-libstdc++ to link line. Hint on
adding -fPIC was not helpful, as it is already added everywhere.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b5af40 in std::ostream::sentry::sentry (this=0x7fffffffcf10,
__os=...)
at
/build/gcc-4.8-Iyjgor/gcc-4.8-4.8.5/build/x86_64-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51
51 if (__os.tie() && __os.good())