------- Additional Comments From gdr at integrable-solutions dot net 2005-05-04 12:12 ------- Subject: Re: Lack of Posix compliant thread safety in std::basic_string
"jkanze at cheuvreux dot com" <[EMAIL PROTECTED]> writes: [...] | This bug report came about because of a discussion in a news | group. Basically, I said to watch out for std::string with g++ | if you are in a multithreaded environment. I don't remember my | exact words, but I'm pretty sure that the gist would have been | that the g++ implementation of std::string does not behave as | one might expect. I said it in a newsgroup, rather than making | a bug report, because I knew of the text in the FAQ (or | something similar), and I was convinced that no one here would | consider it an error. Gaby suggested otherwise; that if I could | describe a case where the code could fail, although no thread | modified the string, I should report it as a bug. So we're | here, and I'm getting hounded because my email contains trailers | which I can do nothing about:-). I was inordinately pleased by James -- I think you can abstract over the remark about your mailer, however annoying it is :-) As of the model behind the implementation of std::string, I do not think we have reached an agreement within the maintainers that it is actually right and your description is wrong. I'm of the opinion that we're reached a point where it causes so much conofusion that there must be something wrong with it. Having listening to either sides and looking at the codes, I'm inclined to consider your report valid -- however "hypothetical" my fellow maintainers may consider it :-) Concurrent read accesses should be guaranted, following POSIX. This is not because you're threatening to woersen g++'s reputation or disregard it in production use -- if it were that, I would not worry ;-). This is because no matter what we might say in our FAQ, if the behaviour is odd enough or singular enough, it entails Fear, Uncertainty and Doubt. That is not what we want. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334