valgrind: r3825 - trunk/coregrind/m_scheduler

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

valgrind: r3825 - trunk/coregrind/m_scheduler

svn-2
Author: sewardj
Date: 2005-05-31 18:24:49 +0100 (Tue, 31 May 2005)
New Revision: 3825

Modified:
   trunk/coregrind/m_scheduler/scheduler.c
Log:
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.



Modified: trunk/coregrind/m_scheduler/scheduler.c
===================================================================
--- trunk/coregrind/m_scheduler/scheduler.c 2005-05-31 15:41:42 UTC (rev 3824)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-05-31 17:24:49 UTC (rev 3825)
@@ -632,8 +632,12 @@
    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);
 



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers