]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Call VG_(unknown_SP_update) each time we switch to a new thread. This
authorTom Hughes <tom@compton.nu>
Thu, 10 Nov 2005 15:02:42 +0000 (15:02 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 10 Nov 2005 15:02:42 +0000 (15:02 +0000)
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

coregrind/m_scheduler/scheduler.c

index a056e56ac4dcfbcf1cfa39a2408c6507537a322a..9bfc6ca58b16cded46f8008f8b9a425e141bf230 100644 (file)
@@ -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");