Quantcast

Valgrind: r16327 - in /trunk: NEWS coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind: r16327 - in /trunk: NEWS coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c

svn-2
Author: rhyskidd
Date: Mon May  1 01:41:40 2017
New Revision: 16327

Log:
macos: Fix UNKNOWN task message [id 3444, to mach_task_self(), reply 0x603] (task_register_dyld_image_infos). bz#379371

Modified:
    trunk/NEWS
    trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
    trunk/coregrind/m_syswrap/syswrap-darwin.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon May  1 01:41:40 2017
@@ -158,6 +158,8 @@
 378673  Update libiberty demangler
 379039  syscall wrapper for prctl(PR_SET_NAME) must not check more than 16 bytes
 379094  Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
+379371  UNKNOWN task message [id 3444, to mach_task_self(), reply 0x603]
+        (task_register_dyld_image_infos)
 379390  unhandled syscall: mach:70 (host_create_mach_voucher_trap)
 
 Release 3.12.0 (20 October 2016)

Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Mon May  1 01:41:40 2017
@@ -748,6 +748,7 @@
 
 #if DARWIN_VERS >= DARWIN_10_12
 DECL_TEMPLATE(darwin, host_create_mach_voucher_trap);
+DECL_TEMPLATE(darwin, task_register_dyld_image_infos);
 #endif /* DARWIN_VERS >= DARWIN_10_12 */
 
 DECL_TEMPLATE(darwin, mach_timebase_info);

Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Mon May  1 01:41:40 2017
@@ -8207,6 +8207,12 @@
    case 3420:
       CALL_PRE(task_policy_set);
       return;
+
+#if DARWIN_VERS >= DARWIN_10_12
+   case 3444:
+      CALL_PRE(task_register_dyld_image_infos);
+      return;
+#endif /* DARWIN_VERS >= DARWIN_10_12 */
       
    case 3801:
       CALL_PRE(vm_allocate);
@@ -9812,6 +9818,44 @@
         ARG1, ARG2, ARG3, ARG4);
 }
 
+PRE(task_register_dyld_image_infos)
+{
+#pragma pack(4)
+    typedef struct {
+       mach_msg_header_t Head;
+       /* start of the kernel processed data */
+       mach_msg_body_t msgh_body;
+       mach_msg_ool_descriptor_t dyld_images;
+       /* end of the kernel processed data */
+       NDR_record_t NDR;
+       mach_msg_type_number_t dyld_imagesCnt;
+    } Request;
+#pragma pack()
+    
+    // Request *req = (Request *)ARG1;
+    
+    PRINT("task_register_dyld_image_infos(%s)", name_for_port(MACH_REMOTE));
+    
+    AFTER = POST_FN(task_register_dyld_image_infos);
+}
+
+POST(task_register_dyld_image_infos)
+{
+#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);
+    }
+}
+
 #endif /* DARWIN_VERS >= DARWIN_10_12 */
 
 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...