This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13487] New: Construction of local static objects is not thread-safe
- From: "rmerkert at alphatech dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Dec 2003 02:31:35 -0000
- Subject: [Bug c++/13487] New: Construction of local static objects is not thread-safe
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I've just recently run into this particular problem (see original PR 7458). It
was my understanding that compiling gcc with the enable-threads option would
provide a certain level of thread safety within C++ code (not just for exception
handling).
This topic has been briefly discussed in the mailing list:
http://gcc.gnu.org/ml/gcc/2002-08/msg00274.html
and Mark Mitchell stated that there is no real performance overhead to
implementing this.
Anyway, I think this should be implemented unless there is a really good reason
for not doing it. Or at least a warning maybe that code using static local
objects is not threadsafe?
--
Summary: Construction of local static objects is not thread-safe
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rmerkert at alphatech dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13487