[compiler-rt] [rtsan] Intercept aligned_alloc on all versions of OSX if available on build machine (PR #112780)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 04:10:37 PDT 2024
================
@@ -120,13 +120,17 @@ TEST(TestRtsanInterceptors, VallocDiesWhenRealtime) {
ExpectNonRealtimeSurvival(Func);
}
-#if SANITIZER_INTERCEPT_ALIGNED_ALLOC
TEST(TestRtsanInterceptors, AlignedAllocDiesWhenRealtime) {
- auto Func = []() { EXPECT_NE(nullptr, aligned_alloc(16, 32)); };
- ExpectRealtimeDeath(Func, "aligned_alloc");
- ExpectNonRealtimeSurvival(Func);
-}
+#if SANITIZER_APPLE
+ if (__builtin_available(macOS 10.15, *)) {
----------------
davidtrevelyan wrote:
Nice, in that case it sounds like `__builtin_available` is the recommended way forward, then?
https://github.com/llvm/llvm-project/pull/112780
More information about the llvm-commits
mailing list