VG_(shadow_base), VG_(shadow_end));
}
if (info->si_code == 1 /* SEGV_MAPERR */
- && fault >= (esp - ARCH_STACK_REDZONE_SIZE)) {
+ && fault >= (esp - ARCH_STACK_REDZONE_SIZE)
+ && fault < VG_(client_end)) {
/* If the fault address is above esp but below the current known
stack segment base, and it was a fault because there was
nothing mapped there (as opposed to a permissions fault),
if (0)
VG_(kill_self)(sigNo); /* generate a core dump */
- tst = VG_(get_ThreadState)(VG_(get_lwp_tid)(VG_(gettid)()));
+ if (tid == 0) /* could happen after everyone has exited */
+ tid = VG_(master_tid);
+ tst = VG_(get_ThreadState)(tid);
VG_(core_panic_at)("Killed by fatal signal",
VG_(get_ExeContext2)(UCONTEXT_INSTR_PTR(uc),
UCONTEXT_FRAME_PTR(uc),