Quantcast

Valgrind: r16328 - 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: r16328 - in /trunk: NEWS coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c

svn-2
Author: rhyskidd
Date: Mon May  1 02:44:01 2017
New Revision: 16328

Log:
macos: Fix UNKNOWN task message [id 3447, to mach_task_self(), reply 0x603] (task_register_dyld_shared_cache_image_info). bz#379372

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 02:44:01 2017
@@ -160,6 +160,8 @@
 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)
+379372  UNKNOWN task message [id 3447, to mach_task_self(), reply 0x603]
+        (task_register_dyld_shared_cache_image_info)
 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 02:44:01 2017
@@ -749,6 +749,7 @@
 #if DARWIN_VERS >= DARWIN_10_12
 DECL_TEMPLATE(darwin, host_create_mach_voucher_trap);
 DECL_TEMPLATE(darwin, task_register_dyld_image_infos);
+DECL_TEMPLATE(darwin, task_register_dyld_shared_cache_image_info);
 #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 02:44:01 2017
@@ -8212,6 +8212,10 @@
    case 3444:
       CALL_PRE(task_register_dyld_image_infos);
       return;
+
+   case 3447:
+      CALL_PRE(task_register_dyld_shared_cache_image_info);
+      return;
 #endif /* DARWIN_VERS >= DARWIN_10_12 */
       
    case 3801:
@@ -9856,6 +9860,43 @@
     }
 }
 
+PRE(task_register_dyld_shared_cache_image_info)
+{
+#pragma pack(4)
+    typedef struct {
+       mach_msg_header_t Head;
+       NDR_record_t NDR;
+       dyld_kernel_image_info_t dyld_cache_image;
+       boolean_t no_cache;
+       boolean_t private_cache;
+    } Request;
+#pragma pack()
+    
+    // Request *req = (Request *)ARG1;
+    
+    PRINT("task_register_dyld_shared_cache_image_info(%s)",
+        name_for_port(MACH_REMOTE));
+    
+    AFTER = POST_FN(task_register_dyld_shared_cache_image_info);
+}
+
+POST(task_register_dyld_shared_cache_image_info)
+{
+#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...