Regression test for thread safety?
Loren James Rittle
Mon Jul 15 20:26:00 GMT 2002
> we're running into a nasty heap corruption problem
> when using gcc3.0.2's stl in a multithreaded application.
How did you configure GCC? We need the exact command line you used.
We also need to know the thread model as reported by ``gcc -v''.
Speaking about the SGI STL portion of libstdc++ only, GCC 3.0 was the
first release to use gcc's concept of thread model support.
Not many ports supported threading by default in the GCC 3.0.X
releases. The situation changed by GCC 3.1, with more and more ports
enabling thread support by default. Before GCC 3.1, the testsuite
actually had zero tests related to threading.
To answer a question raised during follow-up: The six threading tests
do not claim to spot all threading issues. In fact, by their very
nature, most threading failures are non-deterministic. In practice,
at least some of the tests have been designed to stress the key
implementation point of threading support and a test will likely fail
when mutex region locking is not functional or enabled properly in the
library implementation. Some thread tests exercise the per-CPU spin
lock implementation which supports other parts of libstdc++-v3 (but
not the SGI STL portion).
Loren J. Rittle, Principal Staff Engineer, Motorola Labs (IL02/2240)
email@example.com, KeyID: 2048/ADCE34A5, FDC0292446937F2A240BC07D42763672
More information about the Libstdc++