|
From: Jeremy F. <je...@go...> - 2004-03-16 22:07:21
|
CVS commit by fitzhardinge:
Init the per-thread sigaltstacks properly. New threads should always
appear without a sigaltstack.
M +5 -0 vg_scheduler.c 1.144
M +0 -4 vg_signals.c 1.67
--- valgrind/coregrind/vg_scheduler.c #1.143:1.144
@@ -575,4 +575,9 @@ void mostly_clear_thread_record ( Thread
VG_(threads)[tid].proxy = NULL;
+
+ /* start with no altstack */
+ VG_(threads)[tid].altstack.ss_sp = (void *)0xdeadbeef;
+ VG_(threads)[tid].altstack.ss_size = 0;
+ VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
}
--- valgrind/coregrind/vg_signals.c #1.66:1.67
@@ -2392,8 +2392,4 @@ void VG_(sigstartup_actions) ( void )
VG_(ksigfillset)(&vg_scss.scss_per_sig[VKI_SIGVGKILL].scss_mask);
- /* Copy the alt stack, if any. */
- ret = VG_(ksigaltstack)(NULL, &VG_(threads)[1].altstack);
- vg_assert(ret == 0);
-
/* Copy the process' signal mask into the root thread. */
vg_assert(VG_(threads)[1].status == VgTs_Runnable);
|