|
From: <sv...@va...> - 2010-07-22 08:47:29
|
Author: sewardj
Date: 2010-07-22 09:47:19 +0100 (Thu, 22 Jul 2010)
New Revision: 11223
Log:
Add a fix equivalent to r10751 for amd64-darwin: Resync after
{wq,p}thread_hijack rather than merely doing a check. Also, some
whitespace changes that make it easier to diff by eye relative to the
x86-darwin versions. "Fixes" the problem reported at
https://bugs.kde.org/show_bug.cgi?id=205241#c74
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c 2010-07-21 19:54:43 UTC (rev 11222)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c 2010-07-22 08:47:19 UTC (rev 11223)
@@ -331,12 +331,13 @@
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE, -1, 0);
// guard page
ML_(notify_core_and_tool_of_mmap)(
- stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE, 0, VKI_MAP_PRIVATE, -1, 0);
+ stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE,
+ 0, VKI_MAP_PRIVATE, -1, 0);
} else {
// client allocated stack
find_stack_segment(tst->tid, sp);
}
- VG_(am_do_sync_check)("after", "pthread_hijack", 0);
+ ML_(sync_mappings)("after", "pthread_hijack", 0);
// Tell parent thread's POST(sys_bsdthread_create) that we're done
// initializing registers and mapping memory.
@@ -446,7 +447,6 @@
ML_(wqthread_continue_NORETURN)(tst->tid);
}
else {
-
// Record thread's stack and Mach port and pthread struct
tst->os_state.pthread = self;
tst->os_state.lwpid = kport;
@@ -470,9 +470,10 @@
// guard page
// GrP fixme ban_mem_stack!
ML_(notify_core_and_tool_of_mmap)(
- stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE, 0, VKI_MAP_PRIVATE, -1, 0);
+ stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE,
+ 0, VKI_MAP_PRIVATE, -1, 0);
- VG_(am_do_sync_check)("after", "wqthread_hijack", 0);
+ ML_(sync_mappings)("after", "wqthread_hijack", 0);
// Go!
/* Same comments as the 'release' in the then-clause.
|