From: Cherry Mui Date: Tue, 25 Mar 2025 19:21:04 +0000 (-0400) Subject: runtime/race: update darwin race syso X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8282b72d627269ed2c2f7db7ea744e109667d7b1;p=gostls13.git runtime/race: update darwin race syso On macOS, the script in LLVM TSAN building the race syso files produces the Mach-O object with a malformed dynamic symbol table, which new Apple linker doesn't like and emits an annoying warning (https://github.com/golang/go/issues/61229#issuecomment-1988965927). The dynamic symbol table isn't really needed, as it is a static object. Perhaps it should be fixed in TSAN or the C toolchain, but we can do a simple workaround: pass it through "ld -r", which produces an equivalent object file with LC_DYSYMTAB removed. CL 692975 changes racebuild to do this, which produces new syso's in this CL. While here, build the syso with a newer version of LLVM TSAN. Updates #61229. Change-Id: Ide4b7831eb2cb6877c8ace7b3ec8ff565a9eaf54 Reviewed-on: https://go-review.googlesource.com/c/go/+/692996 Reviewed-by: David Chase TryBot-Bypass: Cherry Mui --- diff --git a/src/runtime/race/README b/src/runtime/race/README index def7bfec86..4fc20efeb3 100644 --- a/src/runtime/race/README +++ b/src/runtime/race/README @@ -4,14 +4,14 @@ the LLVM project (https://github.com/llvm/llvm-project/tree/main/compiler-rt). To update the .syso files use golang.org/x/build/cmd/racebuild. -internal/amd64v1/race_darwin.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. +internal/amd64v1/race_darwin.syso built with LLVM 0398ad41bdf1ce5f74c80a74494bfe733fe3e214 and Go b2960e35804aafbbb0df9973f99b034bea8c150a. internal/amd64v1/race_freebsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_netbsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_openbsd.syso built with LLVM fcf6ae2f070eba73074b6ec8d8281e54d29dbeeb and Go 8f2db14cd35bbd674cb2988a508306de6655e425. internal/amd64v1/race_windows.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v3/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. -race_darwin_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. +race_darwin_arm64.syso built with LLVM 0398ad41bdf1ce5f74c80a74494bfe733fe3e214 and Go b2960e35804aafbbb0df9973f99b034bea8c150a. race_linux_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. race_linux_loong64.syso built with LLVM 83fe85115da9dc25fa270d2ea8140113c8d49670 and Go 037112464b4439571b45536de9ebe4bc9e10ecb7. race_linux_ppc64le.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. diff --git a/src/runtime/race/internal/amd64v1/race_darwin.syso b/src/runtime/race/internal/amd64v1/race_darwin.syso index e92f4ce745..eb9782e105 100644 Binary files a/src/runtime/race/internal/amd64v1/race_darwin.syso and b/src/runtime/race/internal/amd64v1/race_darwin.syso differ diff --git a/src/runtime/race/race_darwin_amd64.go b/src/runtime/race/race_darwin_amd64.go index 02d73f8d38..ef92e41c27 100644 --- a/src/runtime/race/race_darwin_amd64.go +++ b/src/runtime/race/race_darwin_amd64.go @@ -28,9 +28,6 @@ package race //go:cgo_import_dynamic _dyld_get_shared_cache_uuid _dyld_get_shared_cache_uuid "" //go:cgo_import_dynamic _dyld_image_count _dyld_image_count "" //go:cgo_import_dynamic _exit _exit "" -//go:cgo_import_dynamic _sanitizer_internal_memcpy _sanitizer_internal_memcpy "" -//go:cgo_import_dynamic _sanitizer_internal_memmove _sanitizer_internal_memmove "" -//go:cgo_import_dynamic _sanitizer_internal_memset _sanitizer_internal_memset "" //go:cgo_import_dynamic abort abort "" //go:cgo_import_dynamic arc4random_buf arc4random_buf "" //go:cgo_import_dynamic close close "" @@ -40,6 +37,7 @@ package race //go:cgo_import_dynamic dyld_shared_cache_iterate_text dyld_shared_cache_iterate_text "" //go:cgo_import_dynamic execve execve "" //go:cgo_import_dynamic exit exit "" +//go:cgo_import_dynamic fcntl fcntl "" //go:cgo_import_dynamic fstat$INODE64 fstat$INODE64 "" //go:cgo_import_dynamic ftruncate ftruncate "" //go:cgo_import_dynamic getpid getpid "" @@ -57,7 +55,6 @@ package race //go:cgo_import_dynamic madvise madvise "" //go:cgo_import_dynamic malloc_num_zones malloc_num_zones "" //go:cgo_import_dynamic malloc_zones malloc_zones "" -//go:cgo_import_dynamic memcpy memcpy "" //go:cgo_import_dynamic memset_pattern16 memset_pattern16 "" //go:cgo_import_dynamic mkdir mkdir "" //go:cgo_import_dynamic mprotect mprotect "" @@ -103,6 +100,3 @@ package race //go:cgo_import_dynamic vm_region_recurse_64 vm_region_recurse_64 "" //go:cgo_import_dynamic waitpid waitpid "" //go:cgo_import_dynamic write write "" -//go:cgo_import_dynamic memcpy memcpy "" -//go:cgo_import_dynamic memmove memmove "" -//go:cgo_import_dynamic memset memset "" diff --git a/src/runtime/race/race_darwin_arm64.go b/src/runtime/race/race_darwin_arm64.go index cb703a6ded..97eab4d684 100644 --- a/src/runtime/race/race_darwin_arm64.go +++ b/src/runtime/race/race_darwin_arm64.go @@ -27,9 +27,6 @@ package race //go:cgo_import_dynamic _dyld_get_shared_cache_uuid _dyld_get_shared_cache_uuid "" //go:cgo_import_dynamic _dyld_image_count _dyld_image_count "" //go:cgo_import_dynamic _exit _exit "" -//go:cgo_import_dynamic _sanitizer_internal_memcpy _sanitizer_internal_memcpy "" -//go:cgo_import_dynamic _sanitizer_internal_memmove _sanitizer_internal_memmove "" -//go:cgo_import_dynamic _sanitizer_internal_memset _sanitizer_internal_memset "" //go:cgo_import_dynamic abort abort "" //go:cgo_import_dynamic arc4random_buf arc4random_buf "" //go:cgo_import_dynamic bzero bzero "" @@ -40,6 +37,7 @@ package race //go:cgo_import_dynamic dyld_shared_cache_iterate_text dyld_shared_cache_iterate_text "" //go:cgo_import_dynamic execve execve "" //go:cgo_import_dynamic exit exit "" +//go:cgo_import_dynamic fcntl fcntl "" //go:cgo_import_dynamic fstat fstat "" //go:cgo_import_dynamic ftruncate ftruncate "" //go:cgo_import_dynamic getpid getpid "" @@ -57,7 +55,6 @@ package race //go:cgo_import_dynamic madvise madvise "" //go:cgo_import_dynamic malloc_num_zones malloc_num_zones "" //go:cgo_import_dynamic malloc_zones malloc_zones "" -//go:cgo_import_dynamic memcpy memcpy "" //go:cgo_import_dynamic memset_pattern16 memset_pattern16 "" //go:cgo_import_dynamic mkdir mkdir "" //go:cgo_import_dynamic mprotect mprotect "" @@ -103,6 +100,3 @@ package race //go:cgo_import_dynamic vm_region_recurse_64 vm_region_recurse_64 "" //go:cgo_import_dynamic waitpid waitpid "" //go:cgo_import_dynamic write write "" -//go:cgo_import_dynamic memcpy memcpy "" -//go:cgo_import_dynamic memmove memmove "" -//go:cgo_import_dynamic memset memset "" diff --git a/src/runtime/race/race_darwin_arm64.syso b/src/runtime/race/race_darwin_arm64.syso index 8d8c120717..eb25805f00 100644 Binary files a/src/runtime/race/race_darwin_arm64.syso and b/src/runtime/race/race_darwin_arm64.syso differ