[compiler-rt] Reland "[rtsan] Intercept aligned_alloc on all versions of OSX if available on the build machine" (PR #114153)

Mariusz Borsa via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 17:43:01 PDT 2024


================
@@ -464,10 +464,13 @@ INTERCEPTOR(void *, valloc, SIZE_T size) {
 }
 
 #if SANITIZER_INTERCEPT_ALIGNED_ALLOC
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
----------------
wrotki wrote:

>From what I see in the comments around SANITIZER_WEAK_IMPORT in  different places (TSAN sources) (aligned_alloc is decorated with it), it might be that the call to the function will be 'ignored'. Perhaps there'll be some default (empty) impl of it, so it won't perhaps crash. But also it won't do what the function normally is expected to do, so the crash might still happen ('default' aligned_alloc might return NULL?)

Sorry, I'm not very familiar with these weak references, so perhaps my understanding is a bit vague.

https://github.com/llvm/llvm-project/pull/114153


More information about the llvm-commits mailing list