This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Is there a thread safe workaround for std::string gcc2.96 ?
- From: "Karl Bridger" <karl dot bridger at saab-its dot com dot au>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 31 Mar 2004 09:33:43 +0930
- Subject: Is there a thread safe workaround for std::string gcc2.96 ?
I am having some trouble with, what I believe is a race condition in the std::string library in multi thread applications on multi-cpu x86 boxs.
The version in question is: gcc: 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
>From my research I have concluded that there exists known bugs/issues with this version (please correct me if I'm wrong).
What I would like to know is, is there a workaround for this problem?
Upgrading is not really an option since we have a large code base which has dependency on 3rd party libraries and would require a large porting effort..
I would be happy to replace the std::string implementation if that is an option.. A simple replacement would suffice, COW semantics are not required, stability is more important than performance (in this instance :)
Any help you can provide would be greatly appreciated..
Regards,
Karl