This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/31117] c++locale.o thread-unsafe in libstdc++
- From: "craig dot lawson at centrify dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2007 18:26:55 -0000
- Subject: [Bug libstdc++/31117] c++locale.o thread-unsafe in libstdc++
- References: <bug-31117-9156@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from craig dot lawson at centrify dot com 2007-03-12 18:26 -------
Perhaps there are different degrees of thread safety here.
If I write my multi-threaded program such that only one thread does stream I/O
with libstdc++, I would expect it to operate safely with respect to the locale
issue. But it will not: any other thread which modifies errno (via set_errno)
is potential trouble for my stream I/O thread.
On the other hand, if __convert_to_v was compiled to use the errno address
function, my program would be correct.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31117