From 18014c27f04e1c05ed6b3403a0fc944d9a1da3d3 Mon Sep 17 00:00:00 2001 From: Rhys Kidd Date: Mon, 26 Jan 2015 09:00:51 +0000 Subject: [PATCH] OS X 10.10: Fix incorrect check for presence of unsupported MACH_SEND_TRAILER in mach_msg. Partial fix for BZ #343306. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14890 --- NEWS | 1 + coregrind/m_syswrap/syswrap-darwin.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6d82de4bce..c9f65bd624 100644 --- a/NEWS +++ b/NEWS @@ -76,6 +76,7 @@ where XXXXXX is the bug number as listed below. 342795 Internal glibc __GI_mempcpy call should be intercepted 343012 Unhandled syscall 319 (memfd_create) 343303 Fix known deliberate memory leak in setenv() on Mac OS X 10.10 +343306 OS X 10.10: UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (partial fix) n-i-bz Provide implementations of certain compiler builtins to support compilers who may not provide those n-i-bz Old STABS code is still being compiled, but never used. Remove it. diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 25b5275ed9..2067d8dc44 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -7903,7 +7903,9 @@ PRE(mach_msg) // (but is this only for too-secure processes?) // JRS 11 Nov 2014: this assertion is OK for <= 10.9 but fails on 10.10 # if DARWIN_VERS == DARWIN_10_10 - log_decaying("UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option"); + if (mh->msgh_bits & MACH_SEND_TRAILER) { + log_decaying("UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option"); + } # else vg_assert(! (mh->msgh_bits & MACH_SEND_TRAILER)); # endif -- 2.47.3