This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/21334] Lack of Posix compliant thread safety in std::basic_string


------- Additional Comments From gdr at integrable-solutions dot net  2005-05-02 17:17 -------
Subject: Re:  Lack of Posix compliant thread safety in std::basic_string

"pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org> writes:

| ------- 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

I don't quite understand why you want to see this issue as a memory 
management policy issue, as opposed to a thread safety issue.

| 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,

I don't quite understand what "position papers" you're talking about.
Could you give references to them to clarify the issue?

| *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.

What are those subtle issues with memory management during exceptions?
As far as I can tell, V3 is the only one that insists on COW.  Why is
it that others don't have those "subtle issues"?

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]