[compiler-rt] [compiler-rt][ASan] Define SANITIZER_INTERCEPT_WCSNLEN (PR #164845)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 09:52:21 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Zack Johnson (zacklj89)
<details>
<summary>Changes</summary>
Follow up to #<!-- -->162028
`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is always used instead of using `REAL(wcsnlen)` if intercepted.
---
Full diff: https://github.com/llvm/llvm-project/pull/164845.diff
1 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h (+1)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/164845
More information about the llvm-commits
mailing list