]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix OS X host_create_mach_voucher: UNKNOWN host message [id 222, to mach_host_self...
authorRhys Kidd <rhyskidd@gmail.com>
Sun, 31 May 2015 03:17:53 +0000 (03:17 +0000)
committerRhys Kidd <rhyskidd@gmail.com>
Sun, 31 May 2015 03:17:53 +0000 (03:17 +0000)
bz#343649

Before:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15299

NEWS
coregrind/m_syswrap/priv_syswrap-darwin.h
coregrind/m_syswrap/syswrap-darwin.c

diff --git a/NEWS b/NEWS
index 164e1d1e6a73c733fb67d6db1431eff65d9866ed..789187bdf335693e483197871de620c2a7554207 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -168,6 +168,8 @@ where XXXXXX is the bug number as listed below.
 343525  OS X host_get_special_port: UNKNOWN host message [id 412, to 
         mach_host_self(), reply 0x........]
 343597  ppc64le: incorrect use of offseof macro
+343649  OS X host_create_mach_voucher: UNKNOWN host message [id 222, to 
+        mach_host_self(), reply 0x........]
 343732  Unhandled syscall 144 (setgid) on aarch64
 343733  Unhandled syscall 187 (msgctl and related) on aarch64
 343802  s390x: Fix false positives "conditional jump or move depends on
index 1145ec7f2989f1c802af841793e18cefa61e10f7..090317921c56ab6fce8a7742b43c2e4abbfe8aff 100644 (file)
@@ -573,6 +573,7 @@ DECL_TEMPLATE(darwin, host_page_size);
 DECL_TEMPLATE(darwin, host_get_io_master);
 DECL_TEMPLATE(darwin, host_get_clock_service);
 DECL_TEMPLATE(darwin, host_request_notification);
+DECL_TEMPLATE(darwin, host_create_mach_voucher);
 DECL_TEMPLATE(darwin, host_get_special_port);
 DECL_TEMPLATE(darwin, mach_port_type);
 DECL_TEMPLATE(darwin, mach_port_extract_member);
index cca98dcd89ef3d836da6dc31e8304da2bd921107..de2f7db3ceb428e535d77ac62e4b55e9229330d0 100644 (file)
@@ -4963,6 +4963,45 @@ PRE(host_request_notification)
 }
 
 
+PRE(host_create_mach_voucher)
+{
+#pragma pack(4)
+    typedef struct {
+        mach_msg_header_t Head;
+        NDR_record_t NDR;
+        mach_msg_type_number_t recipesCnt;
+        uint8_t recipes[5120];
+    } Request;
+#pragma pack()
+    
+    Request *req = (Request *)ARG1;
+
+    PRINT("host_create_mach_voucher(count %u)",
+          req->recipesCnt);
+    
+    AFTER = POST_FN(host_create_mach_voucher);
+}
+
+
+POST(host_create_mach_voucher)
+{
+#pragma pack(4)
+    typedef struct {
+        mach_msg_header_t Head;
+        /* start of the kernel processed data */
+        mach_msg_body_t msgh_body;
+        mach_msg_port_descriptor_t voucher;
+        /* end of the kernel processed data */
+    } Reply;
+#pragma pack()
+    
+    Reply *reply = (Reply *)ARG1;
+
+    // RK fixme properly parse this return type
+    PRINT("got voucher %#x ", reply->voucher.name);
+}
+
+
 PRE(host_get_special_port)
 {
 #pragma pack(4)
@@ -7848,6 +7887,9 @@ PRE(mach_msg_host)
    case 217:
       CALL_PRE(host_request_notification);
       return;
+   case 222:
+      CALL_PRE(host_create_mach_voucher);
+      return;
            
    case 412:
       CALL_PRE(host_get_special_port);