|
From: Paul F. <pa...@so...> - 2025-12-09 13:08:43
|
https://sourceware.org/cgit/valgrind/commit/?id=d74347eb4d36c94bb621e0e9fc23e547ad032bdb commit d74347eb4d36c94bb621e0e9fc23e547ad032bdb Author: Paul Floyd <pj...@wa...> Date: Tue Dec 9 14:06:06 2025 +0100 Darwin: add macOS 10.14 support == 714 tests, 77 stderr failures, 5 stdout failures, 0 stderrB failures, 0 stdoutB failures, 33 post failures == x86 tests are all failing due to unsupported instructions I need to go through the Massif tests to filter out all of the new macOS leaks. Otherwise fairly similar to trhe results on macOS 10.13 Diff: --- Makefile.all.am | 6 ++- NEWS | 4 +- configure.ac | 4 ++ coregrind/m_syswrap/syswrap-x86-darwin.c | 3 +- darwin-drd.supp | 68 ++++++++++++++++++++++++++++++++ darwin-helgrind.supp | 43 ++++++++++++++++++++ darwin.supp | 24 +++++++++++ 7 files changed, 148 insertions(+), 4 deletions(-) diff --git a/Makefile.all.am b/Makefile.all.am index d4f6b3fb79..df78960167 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -257,7 +257,8 @@ AM_CCASFLAGS_ARM64_FREEBSD = @FLAG_M64@ -g AM_FLAG_M3264_X86_DARWIN = -arch i386 AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.6 \ + -I@SDK_INC_DIR@ \ + @CLANG_OS_MIN_VERS_ARG@ \ -fno-pic -fno-PIC AM_CFLAGS_PSO_X86_DARWIN = $(AM_CFLAGS_X86_DARWIN) $(AM_CFLAGS_PSO_BASE) @@ -265,7 +266,8 @@ AM_CCASFLAGS_X86_DARWIN = -arch i386 -g AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64 AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.6 + -I@SDK_INC_DIR@ \ + @CLANG_OS_MIN_VERS_ARG@ AM_CFLAGS_PSO_AMD64_DARWIN = $(AM_CFLAGS_AMD64_DARWIN) $(AM_CFLAGS_PSO_BASE) AM_CCASFLAGS_AMD64_DARWIN = -arch x86_64 -g diff --git a/NEWS b/NEWS index 723b716b5e..51ba3e940a 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support -for nanoMIPS/Linux. macOS is supported up to version 10.13 High Sierra. +for nanoMIPS/Linux. macOS is supported up to version 10.14 Mojave. * ==================== CORE CHANGES =================== @@ -14,6 +14,8 @@ for nanoMIPS/Linux. macOS is supported up to version 10.13 High Sierra. s390x: Machine models older than z196 are no longer supported. +Initial support for macOS 10.14 Mojave has been added. + * ==================== TOOL CHANGES =================== diff --git a/configure.ac b/configure.ac index e251d795db..40330fdc31 100644 --- a/configure.ac +++ b/configure.ac @@ -542,6 +542,10 @@ case "${host_os}" in AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) DARWIN_VERS=$DARWIN_10_13 ;; + 18.*) + AC_MSG_RESULT([Darwin 18.x (${kernel}) / macOS 10.14 Mojave]) + DARWIN_VERS=$DARWIN_10_14 + ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.8-10.11, macOS 10.12-10.13)]) diff --git a/coregrind/m_syswrap/syswrap-x86-darwin.c b/coregrind/m_syswrap/syswrap-x86-darwin.c index 76416b06d9..a0bc1a1e7a 100644 --- a/coregrind/m_syswrap/syswrap-x86-darwin.c +++ b/coregrind/m_syswrap/syswrap-x86-darwin.c @@ -430,7 +430,8 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, || DARWIN_VERS == DARWIN_10_10 \ || DARWIN_VERS == DARWIN_10_11 \ || DARWIN_VERS == DARWIN_10_12 \ - || DARWIN_VERS == DARWIN_10_13 + || DARWIN_VERS == DARWIN_10_13 \ + || DARWIN_VERS == DARWIN_10_14 UWord magic_delta = 0xB0; # else # error "magic_delta: to be computed on new OS version" diff --git a/darwin-drd.supp b/darwin-drd.supp index e8cccdaab1..76bdd86368 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -299,3 +299,71 @@ fun:gomp_barrier_wait fun:child } + +# DRD suppressions for Darwin 18 / macOS 10.14 Mohave + +{ + macOS1014:pthread_mutex_destroy + drd:MutexErr + fun:pthread_mutex_destroy +} + +{ + macOS1014:_xpc_dictionary_look_up_table + drd:ConflictingAccess + ... + fun:_xpc_dictionary_look_up_table +} + +{ + macOS1014:objc_msgSendSuper2 + drd:ConflictingAccess + fun:objc_msgSendSuper2 +} + +{ + mac1014:nw_path_copy_interface_with_generation + drd:ConflictingAccess + ... + fun:nw_path_copy_interface_with_generation +} + +{ + mac1014:__setenv_locked + drd:ConflictingAccess + fun:__setenv_locked +} + +{ + mac1014:dlopen_internal + drd:ConflictingAccess + ... + fun:dlopen_internal +} + +{ + mac1014:getpwuid_r + drd:ConflictingAccess + fun:si_search + fun:getpwuid_r +} + +{ + mac1014:_pthread_tsd_cleanup + drd:ConflictingAccess + ... + fun:_pthread_tsd_cleanup +} + +{ + macOS1014:dyld::findMappedRange(unsigned long) + drd:ConflictingAccess + fun:_ZN4dyld15findMappedRangeEm +} + +{ + macOS1014:dyld::addImage(ImageLoader*) + drd:ConflictingAccess + ... + fun:_ZN4dyldL8addImageEP11ImageLoader +} diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index 7588c1d06f..db923303ac 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -141,3 +141,46 @@ fun:_ZNSt3__119__thread_local_dataEv } +# Helgrind Suppressions for Darwin 18.x / macOS 10.14 Mojave + +{ + macOS1014:_xpc_dictionary_look_up_tab + Helgrind:Race + fun:_platform_strcmp + fun:_xpc_dictionary_look_up_table +} + +{ + macOS1014:_pthread_tsd_cleanup + Helgrind:Race + ... + fun:_pthread_tsd_cleanup +} + +{ + macOS1014:nw_path_copy_interface_with_generation + Helgrind:Race + ... + fun:nw_path_copy_interface_with_generation +} + +{ + macOS1014:__setenv_locked + Helgrind:Race + fun:__setenv_locked +} + +{ + macOS1014:_pthread_once_handler + Helgrind:Race + ... + fun:__pthread_once_handler +} + +{ + macOS1014:getpwuid_r + Helgrind:Race + fun:si_search + fun:getpwuid_r +} + diff --git a/darwin.supp b/darwin.supp index af2c3ee698..1fd1948115 100644 --- a/darwin.supp +++ b/darwin.supp @@ -783,3 +783,27 @@ Memcheck:Cond fun:ccaes_vng_ctr_crypt } + +# Suppressions for Darwin 18.x / macOS 10.14 Mojave + +{ + macOS1014:_dyld_start + Memcheck:Cond + ... + fun:_dyld_start +} + +{ + macOS1014:libSystem_initializer + Memcheck:Addr16 + ... + fun:libSystem_initializer +} + +{ + macOS1014:_NXHashRehashToCapacity + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc_zone_calloc + fun:_NXHashRehashToCapacity +} |