[compiler-rt] [TySan] Intercept malloc_size on Apple platforms. (PR #122133)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 03:17:32 PST 2025


================
@@ -110,7 +110,7 @@ INTERCEPTOR(void *, malloc, uptr size) {
 
 #if SANITIZER_APPLE
 INTERCEPTOR(uptr, malloc_size, void *ptr) {
-  if (DlsymAlloc::Use())
+  if (DlsymAlloc::Use() || DlsymAlloc::PointerIsMine(ptr))
----------------
fmayer wrote:

So do we need `DlsymAlloc::Use()` here? To me `DlsymAlloc::PointerIsMine(ptr)` sounds like what we actually care about?

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


More information about the llvm-commits mailing list