]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Completely zero out all the thread records at initialisation. As far
authorJulian Seward <jseward@acm.org>
Tue, 31 May 2005 17:24:49 +0000 (17:24 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 31 May 2005 17:24:49 +0000 (17:24 +0000)
as I can see, deallocate_LGDTs_for_thread were being called on
uninitialised thread records.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3825

coregrind/m_scheduler/scheduler.c

index 1e2c2a3610e4bdba5b28024bec0f476a3178d2e8..05978a283d8bc02b17f3c03bf8f35672c04456a5 100644 (file)
@@ -632,7 +632,11 @@ void VG_(scheduler_init) ( void )
    VG_(sema_init)(&run_sema);
 
    for (i = 0 /* NB; not 1 */; i < VG_N_THREADS; i++) {
-      VG_(threads)[i].sig_queue            = NULL;
+
+      /* Paranoia .. completely zero it out. */
+      VG_(memset)( & VG_(threads)[i], 0, sizeof( VG_(threads)[i] ) );
+
+      VG_(threads)[i].sig_queue = NULL;
 
       VGO_(os_state_init)(&VG_(threads)[i]);
       mostly_clear_thread_record(i);