[compiler-rt] [sanitizer_common][asan] Implement address sanitizer on AIX: interceptors (5/6) (PR #131870)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu May 1 00:40:14 PDT 2025


================
@@ -596,7 +609,13 @@ INTERCEPTOR(char*, strdup, const char *s) {
   GET_STACK_TRACE_MALLOC;
   void *new_mem = asan_malloc(length + 1, &stack);
   if (new_mem) {
+#  if SANITIZER_AIX
+    // memcpy is a static function defined in libc.a on AIX. It can not be
+    // intercepted, so REAL(memcpy) is null on AIX. Use internal_memcpy instead.
----------------
vitalybuka wrote:

#if SANITIZER_INTERCEPT_MEMCPY rather than SANITIZER_AIX?

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


More information about the llvm-commits mailing list