Quantcast

Valgrind: r16326 - in /trunk: NEWS coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c include/vki/vki-scnums-darwin.h

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

Valgrind: r16326 - in /trunk: NEWS coregrind/m_syswrap/priv_syswrap-darwin.h coregrind/m_syswrap/syswrap-darwin.c include/vki/vki-scnums-darwin.h

svn-2
Author: rhyskidd
Date: Sun Apr 30 22:52:33 2017
New Revision: 16326

Log:
macos: Fix unhandled syscall: mach:70 (host_create_mach_voucher_trap). bz#379390

Based upon a patch from Louis Brunner.

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

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Apr 30 22:52:33 2017
@@ -158,6 +158,7 @@
 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
+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 Sun Apr 30 22:52:33 2017
@@ -745,6 +745,11 @@
 DECL_TEMPLATE(darwin, semaphore_timedwait_signal);
 DECL_TEMPLATE(darwin, task_for_pid);
 DECL_TEMPLATE(darwin, pid_for_task);
+
+#if DARWIN_VERS >= DARWIN_10_12
+DECL_TEMPLATE(darwin, host_create_mach_voucher_trap);
+#endif /* DARWIN_VERS >= DARWIN_10_12 */
+
 DECL_TEMPLATE(darwin, mach_timebase_info);
 DECL_TEMPLATE(darwin, mach_wait_until);
 DECL_TEMPLATE(darwin, mk_timer_create);

Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sun Apr 30 22:52:33 2017
@@ -9804,6 +9804,14 @@
                   uint32_t, operation, void*, addr, uint64_t, wake_value);
 }
 
+PRE(host_create_mach_voucher_trap)
+{
+    // munge_wwww -- no need to call helper
+    PRINT("host_create_mach_voucher_trap"
+        "(host:%#lx, recipes:%#lx, recipes_size:%ld, voucher:%#lx) FIXME",
+        ARG1, ARG2, ARG3, ARG4);
+}
+
 #endif /* DARWIN_VERS >= DARWIN_10_12 */
 
 
@@ -10549,8 +10557,12 @@
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(66)),
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(67)),
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(68)),
-   _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(69)),
+   _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(69)),
+#if DARWIN_VERS >= DARWIN_10_12
+   MACX_(__NR_host_create_mach_voucher_trap, host_create_mach_voucher_trap),
+#else
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70)),
+#endif
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(71)),
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(72)),
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(73)),

Modified: trunk/include/vki/vki-scnums-darwin.h
==============================================================================
--- trunk/include/vki/vki-scnums-darwin.h (original)
+++ trunk/include/vki/vki-scnums-darwin.h Sun Apr 30 22:52:33 2017
@@ -202,6 +202,10 @@
 #define __NR_syscall_thread_switch            VG_DARWIN_SYSCALL_CONSTRUCT_MACH(61)
 #define __NR_clock_sleep_trap                 VG_DARWIN_SYSCALL_CONSTRUCT_MACH(62)
 
+#if DARWIN_VERS >= DARWIN_10_12
+#define __NR_host_create_mach_voucher_trap    VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70)
+#endif
+
 #define __NR_mach_timebase_info               VG_DARWIN_SYSCALL_CONSTRUCT_MACH(89)
 #define __NR_mach_wait_until                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(90)
 #define __NR_mk_timer_create                  VG_DARWIN_SYSCALL_CONSTRUCT_MACH(91)


------------------------------------------------------------------------------
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...