|
From: <sv...@va...> - 2016-12-04 03:43:37
|
Author: rhyskidd
Date: Sun Dec 4 03:43:29 2016
New Revision: 16168
Log:
Fix 373046 - Stacks registered by core are never deregistered (macOS-specific follow-up). Refer r16159.
Modified:
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sun Dec 4 03:43:29 2016
@@ -53,6 +53,7 @@
#include "pub_core_scheduler.h"
#include "pub_core_sigframe.h" // For VG_(sigframe_destroy)()
#include "pub_core_signals.h"
+#include "pub_core_stacks.h"
#include "pub_core_syscall.h"
#include "pub_core_syswrap.h"
#include "pub_core_tooliface.h"
@@ -205,6 +206,10 @@
c = VG_(count_living_threads)();
vg_assert(c >= 1); /* stay sane */
+ /* Deregister thread's stack. */
+ if (tst->os_state.stk_id != NULL_STK_ID)
+ VG_(deregister_stack)(tst->os_state.stk_id);
+
// Tell the tool this thread is exiting
VG_TRACK( pre_thread_ll_exit, tid );
|