[compiler-rt] [asan] Implement interception on AIX (PR #131870)
Hubert Tong via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 22:03:43 PST 2025
================
@@ -56,8 +56,18 @@ namespace __asan {
# define ASAN_READ_STRING(ctx, s, n) \
ASAN_READ_STRING_OF_LEN((ctx), (s), internal_strlen(s), (n))
-static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) {
-#if SANITIZER_INTERCEPT_STRNLEN
+static inline void internal_or_real_memcpy(void* new_mem, const char* s,
+ uptr length) {
+# if SANITIZER_INTERCEPT_MEMCPY
----------------
hubert-reinterpretcast wrote:
I don't see the logical reason to use `SANITIZER_INTERCEPT_MEMCPY` here as
- it is unexplained why enabling interception for `memcpy` means we cannot use `internal_memcpy` in this context, and
- this PR is supposed to be an AIX-specific change, so why have a change that reads as being platform-agnostic?
`SANITIZER_INTERCEPT_MEMCPY` was added in d7c6cad744bc7, which basically makes it an alias of `SI_NOT_AIX`. I believe this should just use `SI_NOT_AIX` directly (with a TODO to remove this function when `REAL(memcpy)` is set up to work on AIX).
https://github.com/llvm/llvm-project/pull/131870
More information about the llvm-commits
mailing list