From: Tom Hughes Date: Thu, 10 Nov 2005 15:02:42 +0000 (+0000) Subject: Call VG_(unknown_SP_update) each time we switch to a new thread. This X-Git-Tag: svn/VALGRIND_3_1_0~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd590a7f95a1ad718712faceed7614c7b7cb66e8;p=thirdparty%2Fvalgrind.git Call VG_(unknown_SP_update) each time we switch to a new thread. This ensures that current_stack is switched to the new thread's stack so that we don't ignore the next stack update and hence fail to mark memory that should be valid as valid. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5070 --- diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c index a056e56ac4..9bfc6ca58b 100644 --- a/coregrind/m_scheduler/scheduler.c +++ b/coregrind/m_scheduler/scheduler.c @@ -203,6 +203,8 @@ void VG_(set_running)(ThreadId tid) vg_assert(VG_(running_tid) == VG_INVALID_THREADID); VG_(running_tid) = tid; + VG_(unknown_SP_update)(VG_(get_SP(tid)), VG_(get_SP(tid))); + if (VG_(clo_trace_sched)) print_sched_event(tid, "now running");