STL, string bug

Beardsley, Jason
Tue Apr 27 12:43:00 GMT 1999

With the discussion about SGI's STL v3.2 and all, I thought it
appropriate to re-post this bug report.

The problem is, apparently, the <string> implementation provided
with egcs is not multithreaded-safe.  If I had to guess, I'd say
it was a problem with the reference counting, but the internals
of the class are sufficiently obscure that I haven't looked too
hard at it (especially since the SGI <string> works just fine).

I do not know if the libstdc++-v3 <string> is MT-safe, as I have
not tried it.  Obviously, it would be nice if it were, and I do
hope to find some time to give it a shot.

Attached is the usual stuff: the original source, the preprocessed
source, and the compiler messages.  Note that the program only
crashes on multiprocessor boxes - on a uniprocessor, no crash.

Jason Beardsley

More information about the Gcc-bugs mailing list