Bug 407933

Summary: unhandled amd64-darwin syscall: mach:50 VgTs_Runnable syscall mach:50 (lwpid 771)
Product: [Developer tools] valgrind Reporter: hiraditya
Component: callgrindAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: normal CC: pjfloyd
Priority: NOR    
Version First Reported In: 3.14.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 399584    

Description hiraditya 2019-05-25 08:48:05 UTC
SUMMARY
 VgTs_Runnable syscall mach:50 (lwpid 771)

STEPS TO REPRODUCE
1. Cant share the binary sorry.

OBSERVED RESULT
==21848== Callgrind, a call-graph generating cache profiler
==21848== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
==21848== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==21848== Command: fbsimctl launch com.facebook.Wilde
==21848== 
==21848== For interactive control, run 'callgrind_control -h'.
--21848-- UNKNOWN fcntl 98!
--21848-- UNKNOWN fcntl 98! (repeated 2 times)
--21848-- UNKNOWN fcntl 98! (repeated 4 times)
...
--21848-- WARNING: unhandled amd64-darwin syscall: mach:50
--21848-- You may be able to write your own handler.
--21848-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--21848-- Nevertheless we consider this a bug.  Please report
--21848-- it at http://valgrind.org/support/bug_reports.html.
eq_SyscallStatus:
  {78 0 43}
  {78 0 40}

valgrind: m_syswrap/syswrap-main.c:438 (Bool eq_SyscallStatus(UInt, SyscallStatus *, SyscallStatus *)): the 'impossible' happened.


EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 10.14.4
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Paul Floyd 2025-12-06 07:12:33 UTC
It looks like Rhys added support for syscall mach:50 BACK IN 2017 (for Valgrind 3.14).

The fcntl command is still not supported


#define F_CHECK_LV              98      /* Check if Library Validation allows this Mach-O file
 to be mapped into the calling process */

Louis Brunner has added support for more fcntl commands:

#if DARWIN_VERS >= DARWIN_10_14
# define VKI_F_CHECK_LV                  F_CHECK_LV
#endif

Coming soon, hopefully.
Comment 2 Paul Floyd 2025-12-19 10:59:59 UTC
Code for 10.14 has landed. I did see this kind of error whilst merging the code. Looks like it is fixed now.