[compiler-rt] [rtsan] Intercept aligned_alloc on all versions of OSX if available on build machine (PR #112780)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 08:09:00 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, *)) {
----------------
cjappl wrote:
All signs seem to be pointing that way. I definitely worry (since the `std::variant` debacle) about using something in compiler-rt that hasn't been used before, but seeing as it is only in a test file it seems less risky.
Also to be clear, this test passes on my mac that has `aligned_alloc` available, so this all works as intended :)
https://github.com/llvm/llvm-project/pull/112780
More information about the llvm-commits
mailing list