Darwin only: don't tell aspacemgr about the kernel commpage -- only
tell the tool. This is because telling the aspacemgr about it causes
the sync checker to fail entirely on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14137 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_main.c b/coregrind/m_main.c
index 4485f03..7641e8c 100644
--- a/coregrind/m_main.c
+++ b/coregrind/m_main.c
@@ -2301,6 +2301,24 @@
/* Clear the running thread indicator */
VG_(running_tid) = VG_INVALID_THREADID;
tl_assert(VG_(running_tid) == VG_INVALID_THREADID);
+
+ /* Darwin only: tell the tools where the client's kernel commpage
+ is. It would be better to do this by telling aspacemgr about
+ it -- see the now disused record_system_memory() in
+ initimg-darwin.c -- but that causes the sync checker to fail,
+ since the mapping doesn't appear in the kernel-supplied
+ process map. So do it here instead. */
+# if defined(VGP_amd64_darwin)
+ VG_TRACK( new_mem_startup,
+ 0x7fffffe00000, 0x7ffffffff000-0x7fffffe00000,
+ True, False, True, /* r-x */
+ 0 /* di_handle: no associated debug info */ );
+# elif defined(VGP_x86_darwin)
+ VG_TRACK( new_mem_startup,
+ 0xfffec000, 0xfffff000-0xfffec000,
+ True, False, True, /* r-x */
+ 0 /* di_handle: no associated debug info */ );
+# endif
}
//--------------------------------------------------------------