James FitzGibbon wrote:
>
> The program will core after about 10 seconds, every time.
> It would appear that there is an issue with some low-level allocator in the
> STL as shipped in 4.x.
Dude. The STL implementation that ships with g++ isn't thread safe.
In fact, if you read the STL portion of the C++ specification, you will
notice that threads are not mentioned at all. The only guarantees made
by the STL are that operations will complete within certain performance
guidelines.
As a safety tip, the string implementation in the g++ implementation
isn't thread safe either. It uses a shared buffer scheme ("char*
string->rep") to reduce memory consumption & improve performance. This
is in opposition to "deep copy" style libraries, like the SGI STL, that
work in threaded environments.
Because of the way the C++ standard is written, commercial STL
implementations, such as the Rogue Wave library that comes with the Sun
C++ compiler, suffer from the same threading problems.
--
Jack Rusher, Senior Engineer | mailto:[EMAIL PROTECTED]
Integratus, Inc. | http://www.integratus.com
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message