This is the mail archive of the
mailing list for the libstdc++ project.
Re: Regression test for thread safety?
- From: Andreas Jaeger <aj at suse dot de>
- To: dank at kegel dot com
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 14 Jul 2002 17:07:53 +0200
- Subject: Re: Regression test for thread safety?
- References: <3D317BFA.33FE1A10@kegel.com>
> we're running into a nasty heap corruption problem
> when using gcc3.0.2's stl in a multithreaded application.
> I have read
> and understand that STL is threadsafe only in
> a limited sense. I looked around a bit
> for a regression test for STL that tested this
> limited thread safety -- for example, by running
> plain old STL regression tests in many noninteracting threads
> at the same time, and was dismayed to find none.
> For instance, I downloaded
> ... pub/gcc/releases/gcc-3.1/gcc-testsuite-3.1.tar.bz2
> unpacked it, and did
> find . -print | xargs grep pthread_create
> and saw *zero* matches. Same goes for the test suite
> across town at stlport.org.
> If I missed something obvious, I'd appreciate a pointer
> to where the thread safety regression test lives, thanks.
It might be that gcc-testsuite-3.1.tar does not contain the libstdc++
testsuite. A CVS checkout shows the following:
gromit:/cvs/gcc-3_1-branch/libstdc++-v3:$ grep -r pthread_create .
./testsuite/thread/pthread1.cc: pthread_create (&prod[i], NULL, produce, static_cast<void*> (tq[i]));
./testsuite/thread/pthread1.cc: pthread_create (&cons[i], NULL, consume, static_cast<void*> (tq[i]));
./testsuite/thread/pthread2.cc: pthread_create (&tid[i], NULL, thread_main, 0);
./testsuite/thread/pthread3.cc: pthread_create (&tid[i], NULL, thread_main, 0);
./testsuite/thread/pthread4.cc: pthread_create (&prod, NULL, produce, NULL);
./testsuite/thread/pthread4.cc: pthread_create (&cons, NULL, consume, NULL);
./testsuite/thread/pthread5.cc: if (pthread_create(&threads[worker], &tattr,
./testsuite/thread/pthread6.cc: pthread_create (&tid[i], NULL, thread_main, 0);
So, there're 6 pthread tests,
SuSE Labs firstname.lastname@example.org