]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix UNKNOWN task message [id 3410, to mach_task_self(), reply 0x........] (task_set_s...
authorRhys Kidd <rhyskidd@gmail.com>
Sat, 13 Jun 2015 22:59:47 +0000 (22:59 +0000)
committerRhys Kidd <rhyskidd@gmail.com>
Sat, 13 Jun 2015 22:59:47 +0000 (22:59 +0000)
bz#349087

On OS X 10.10

Before:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

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

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

diff --git a/NEWS b/NEWS
index 40089f93ac6f189eb1521150087ff94781d290d4..f9ae0ba8fc25b29884a97d9a8c3e57502d55dd64 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -239,6 +239,8 @@ where XXXXXX is the bug number as listed below.
 348949  Bogus "ERROR: --ignore-ranges: suspiciously large range"
 349086  Fix UNKNOWN task message [id 3406, to mach_task_self(), 
         reply 0x........] (task_set_info)
+349087  Fix UNKNOWN task message [id 3410, to mach_task_self(),
+        reply 0x........] (task_set_special_port)
 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.
index 051d0f55a49f58a9cce242b8758778261df5ac90..7295cf45ea4c76f454aa0d42399299b517b7a019 100644 (file)
@@ -591,6 +591,7 @@ DECL_TEMPLATE(darwin, mach_port_get_attributes);
 DECL_TEMPLATE(darwin, mach_port_set_attributes);
 DECL_TEMPLATE(darwin, mach_port_insert_member);
 DECL_TEMPLATE(darwin, task_get_special_port);
+DECL_TEMPLATE(darwin, task_set_special_port);
 DECL_TEMPLATE(darwin, task_get_exception_ports);
 DECL_TEMPLATE(darwin, semaphore_create);
 DECL_TEMPLATE(darwin, semaphore_destroy);
index 2953d0c982d5ee62f67eb26bd085cdb7cb258e91..9eba9331263fe9c533de090ae6104d12104fc352 100644 (file)
@@ -5851,6 +5851,48 @@ POST(task_get_special_port)
 }
 
 
+PRE(task_set_special_port)
+{
+#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 special_port;
+        /* end of the kernel processed data */
+        NDR_record_t NDR;
+        int which_port;
+    } Request;
+#pragma pack()
+    
+    Request *req = (Request *)ARG1;
+
+    PRINT("got port %#x ", req->special_port.name);
+    
+    // MACH_ARG(task_set_special_port.which_port) = req->which_port;
+    PRINT("%s", name_for_port(req->special_port.name));
+    
+    AFTER = POST_FN(task_set_special_port);
+}
+
+POST(task_set_special_port)
+{
+#pragma pack(4)
+    typedef struct {
+        mach_msg_header_t Head;
+        NDR_record_t NDR;
+        kern_return_t RetCode;
+    } Reply;
+#pragma pack()
+    
+    Reply *reply = (Reply *)ARG1;
+    if (!reply->RetCode) {
+    } else {
+        PRINT("mig return %d", reply->RetCode);
+    }
+}
+
+
 PRE(semaphore_create)
 {
 #pragma pack(4)
@@ -8032,10 +8074,12 @@ PRE(mach_msg_task)
    case 3408:
       CALL_PRE(task_resume);
       return;
-      
    case 3409:
       CALL_PRE(task_get_special_port);
       return;
+   case 3410:
+      CALL_PRE(task_set_special_port);
+      return;
    case 3411:
       CALL_PRE(thread_create);
       return;