Regression test for thread safety?
Phil Edwards
phil@jaj.com
Mon Jul 15 12:43:00 GMT 2002
On Sun, Jul 14, 2002 at 01:51:39PM -0700, Dan Kegel wrote:
> I did some experiments to measure how effective these tests are
> at detecting thread safety problems. First, I tested whether
> compiling with -D_NOTHREADS disabled locking. As expected,
> g++-3.0 -E t.C | grep -i __lock_instance
> showed hits, but adding -D_NOTHREADS showed no hits.
Something you should know if you haven't discovered it since your email:
turning thread support on and off is only supported by the command-line flags
like "-pthread" or "-mthreads" or whatever is appropriate for your platform.
Preprocessor symbol hacks like _NOTHREADS were never documented and aren't
really supported.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
More information about the Libstdc++
mailing list