This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/32261] Thread race segfault in std::string::append with -O and -s
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2007 23:50:46 -0000
- Subject: [Bug libstdc++/32261] Thread race segfault in std::string::append with -O and -s
- References: <bug-32261-7959@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from pcarlini at suse dot de 2007-06-25 23:50 -------
Probably, the answer is yes. In this area, when writing portable code, always
remember that C++03 says *nothing* about threads, and concurrent programming,
and so on. Different implementations, historically, made different choices,
different routes and trade-offs. That means that in general, if you cannot
optimize for the implementation defined details of a specific implementation,
you end-up locking a lot, for safety. That's unfortunate, I agree. The next C++
standard (and ext/vstring.h ;) will be better, certainly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32261