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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NEWS b/NEWS
index 6d82de4..c9f65bd 100644
--- a/NEWS
+++ b/NEWS
@@ -76,6 +76,7 @@
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 25b5275..2067d8d 100644
--- a/coregrind/m_syswrap/syswrap-darwin.c
+++ b/coregrind/m_syswrap/syswrap-darwin.c
@@ -7903,7 +7903,9 @@
// (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