[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
+ REAL(memcpy)(new_mem, s, length + 1);
+# else
+ internal_memcpy(new_mem, s, length + 1);
+# endif
+}
+
+[[maybe_unused]] static inline uptr MaybeRealStrnlen(const char* s,
----------------
hubert-reinterpretcast wrote:
What is the reason for the addition of `[[maybe_unused]]` here as part of this PR?
https://github.com/llvm/llvm-project/pull/131870
More information about the llvm-commits
mailing list