This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/21334] Lack of Posix compliant thread safety in std::basic_string
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2005 17:01:36 -0000
- Subject: [Bug libstdc++/21334] Lack of Posix compliant thread safety in std::basic_string
- References: <20050502114518.21334.jkanze@cheuvreux.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2005-05-02 17:01 -------
> You probably got the mail about users saying that he read on C++
> newsgroups that V3-s implementation of std::string is known to be
> avoided in multi-threaded programs.
Whereas I'm all for providing alternate memory management policies (we are
very close to that in the v7-branch and I promise further progress during
the next months) I fail to properly appreciate the actual details of this issue:
which applications are actually penalized, which are the alternatives, something
more concrete, in other terms, that a vague reference to those "position" papers
that we all know, in other terms ;) (and one of those I'd like to discuss
in detail...) Maybe James can help here. In practice, we could, for instance,
*within the current ABI*, provide a switch to disable completely reference
counting, would that be appreciated? I can implement this very quickly but I'd
like to have some evidence that a non-trivial number of users would appreciate
that short-term solution. That would be indeed, a short term solution, because
a library relying purely on a non-refcounted string has subtle issues with
memory allocation during exceptions, that definitely we don't want in a long
term solution: if nobody has got a better idea, I'm afraid we have to implement
also a separate ref-counted mini-string for usage in exceptions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334