]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When nuking threads we set their status to VgTs_Empty. This patch
authorTom Hughes <tom@compton.nu>
Wed, 20 Oct 2004 12:25:59 +0000 (12:25 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 20 Oct 2004 12:25:59 +0000 (12:25 +0000)
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

coregrind/vg_scheduler.c

index 02d884d41b2f618ad96e6769c0a6bad73380f886..8340dfa970e86e24a83fd12e137f63d6c7b92fac 100644 (file)
@@ -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 );
    }
 }