[compiler-rt] 2a03854 - [sanitizer] [Darwin] Disable InstallAtForkHandler

Azharuddin Mohammed via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 12:35:48 PST 2023


Author: Azharuddin Mohammed
Date: 2023-12-18T12:32:17-08:00
New Revision: 2a03854e4ce9bb1bcd79a211063bc63c4657f92c

URL: https://github.com/llvm/llvm-project/commit/2a03854e4ce9bb1bcd79a211063bc63c4657f92c
DIFF: https://github.com/llvm/llvm-project/commit/2a03854e4ce9bb1bcd79a211063bc63c4657f92c.diff

LOG: [sanitizer] [Darwin] Disable InstallAtForkHandler

This is a followup to d01be3c63109986627c1c029d6d0130f76a63a2f.

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_posix.cpp
    compiler-rt/lib/lsan/lsan_posix.cpp
    compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_posix.cpp b/compiler-rt/lib/asan/asan_posix.cpp
index 0d2e4fe0176772..a5b87b7fbf1b5a 100644
--- a/compiler-rt/lib/asan/asan_posix.cpp
+++ b/compiler-rt/lib/asan/asan_posix.cpp
@@ -149,7 +149,7 @@ void PlatformTSDDtor(void *tsd) {
 #endif
 
 void InstallAtForkHandler() {
-#  if SANITIZER_SOLARIS || SANITIZER_NETBSD
+#  if SANITIZER_SOLARIS || SANITIZER_NETBSD || SANITIZER_APPLE
   return;  // FIXME: Implement FutexWait.
 #  endif
   auto before = []() {

diff  --git a/compiler-rt/lib/lsan/lsan_posix.cpp b/compiler-rt/lib/lsan/lsan_posix.cpp
index e0c1899edcd2cf..4bfadf1ef809c3 100644
--- a/compiler-rt/lib/lsan/lsan_posix.cpp
+++ b/compiler-rt/lib/lsan/lsan_posix.cpp
@@ -101,7 +101,7 @@ void InstallAtExitCheckLeaks() {
 }
 
 void InstallAtForkHandler() {
-#  if SANITIZER_SOLARIS || SANITIZER_NETBSD
+#  if SANITIZER_SOLARIS || SANITIZER_NETBSD || SANITIZER_APPLE
   return;  // FIXME: Implement FutexWait.
 #  endif
   auto before = []() {

diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
index 5c6a8743cdb580..13240234a1c79b 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
@@ -15,6 +15,7 @@
 // FIXME: Requires `FutexWait` implementation. See __asan::InstallAtForkHandler.
 // UNSUPPORTED: target={{.*solaris.*}}
 // UNSUPPORTED: target={{.*netbsd.*}}
+// UNSUPPORTED: target={{.*apple.*}}
 
 // Forking in multithread environment is unsupported. However we already have
 // some workarounds, and will add more, so this is the test.


        


More information about the llvm-commits mailing list