From: Julian Seward Date: Tue, 31 May 2005 17:24:49 +0000 (+0000) Subject: Completely zero out all the thread records at initialisation. As far X-Git-Tag: svn/VALGRIND_3_0_0~493 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61dfd314345ce95489681652910b32a2e24bbd04;p=thirdparty%2Fvalgrind.git Completely zero out all the thread records at initialisation. As far 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 --- diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c index 1e2c2a3610..05978a283d 100644 --- a/coregrind/m_scheduler/scheduler.c +++ b/coregrind/m_scheduler/scheduler.c @@ -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);