From: Tom Hughes Date: Wed, 20 Oct 2004 12:25:59 +0000 (+0000) Subject: When nuking threads we set their status to VgTs_Empty. This patch X-Git-Tag: svn/VALGRIND_3_0_0~1477 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3c298ae3069127668182f4875df52040b8c969e;p=thirdparty%2Fvalgrind.git When nuking threads we set their status to VgTs_Empty. This patch ensures that any associated mutex and conditional variable pointers are also cleared so that the thread state appears sane. BUG: 91599 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2818 --- diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 02d884d41b..8340dfa970 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -1373,6 +1373,8 @@ void VG_(nuke_all_threads_except) ( ThreadId me ) "VG_(nuke_all_threads_except): nuking tid %d\n", tid); VG_(proxy_delete)(tid, True); VG_(threads)[tid].status = VgTs_Empty; + VG_(threads)[tid].associated_mx = NULL; + VG_(threads)[tid].associated_cv = NULL; cleanup_after_thread_exited( tid, True ); } }