This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/67791] Crash using std::thread and iostream with dynamic loading of a shared library
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Oct 2015 00:22:41 +0000
- Subject: [Bug libstdc++/67791] Crash using std::thread and iostream with dynamic loading of a shared library
- Auto-submitted: auto-generated
- References: <bug-67791-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67791
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So the problem here is libstdc++ first tries to figures out if you are linked
against pthreads and if you are not then it skips locks in some cases. In this
case since the main program was not linked against pthreads and you initialized
libstdc++ via the include of iostream, it sets the single threaded use case.