This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/12658] Thread safety problems in locale::global() and locale::locale()
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2003 18:44:33 -0000
- Subject: [Bug libstdc++/12658] Thread safety problems in locale::global() and locale::locale()
- References: <20031017095219.12658.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bkoz at gcc dot gnu dot org 2003-12-13 18:44 -------
Paolo, my bad. I'm sorry.
You are correct. I think just splitting locale::locale() up into:
+ _S_initialize();
+ _S_global->_M_add_reference();
+ _M_impl = _S_global;
Will be sufficient, without the heavyweight locks, which is good. Loren, isn't
this correct? This would solve your comment as well.
-benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12658