[compiler-rt] a280275 - [compiler-rt] Fix #83679 for macos sdk < 13.0 (#109946)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 10:11:05 PDT 2024


Author: David CARLIER
Date: 2024-09-25T18:11:02+01:00
New Revision: a280275cff497f96492d7c1094ba30309dbd3ad6

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

LOG: [compiler-rt] Fix #83679 for macos sdk < 13.0 (#109946)

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 05fa7e63268f26..d4cc380f641b82 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -606,7 +606,13 @@
 // FIXME: also available from musl 1.2.5
 #define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
 #define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
-#define SANITIZER_INTERCEPT_FREADLINK SI_MAC
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
+    __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130000
+#  define SI_MAC_DEPLOYMENT_BELOW_13_00 1
+#else
+#  define SI_MAC_DEPLOYMENT_BELOW_13_00 0
+#endif
+#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && !SI_MAC_DEPLOYMENT_BELOW_13_00)
 
 // This macro gives a way for downstream users to override the above
 // interceptor macros irrespective of the platform they are on. They have


        


More information about the llvm-commits mailing list