[compiler-rt] [compiler-rt][ASan] Define SANITIZER_INTERCEPT_WCSNLEN (PR #164845)
Zack Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 09:51:39 PDT 2025
https://github.com/zacklj89 created https://github.com/llvm/llvm-project/pull/164845
Follow up to #162028
`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is always used instead of using `REAL(wcsnlen)` if intercepted.
>From 43530cc69241fd7a594b9f5c4d9b67647d7a9217 Mon Sep 17 00:00:00 2001
From: Zack Johnson <zajohnson at microsoft.com>
Date: Thu, 23 Oct 2025 12:27:47 -0400
Subject: [PATCH] Define SANITIZER_WCSNLEN
---
.../lib/sanitizer_common/sanitizer_platform_interceptors.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 88ecd7e16306a..ed60671014d5a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -551,6 +551,7 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
#define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE (!SI_MAC && !SI_NETBSD)
#define SANITIZER_INTERCEPT_MCHECK_MPROBE SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_WCSLEN 1
+#define SANITIZER_INTERCEPT_WCSNLEN 1
#define SANITIZER_INTERCEPT_WCSCAT (SI_POSIX || SI_WINDOWS)
#define SANITIZER_INTERCEPT_WCSDUP SI_POSIX
#define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
More information about the llvm-commits
mailing list