[compiler-rt] 1c53bfc - [compiler-rt][ASan] Define SANITIZER_INTERCEPT_WCSNLEN (#164845)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 10:16:16 PDT 2025


Author: Zack Johnson
Date: 2025-10-23T13:16:13-04:00
New Revision: 1c53bfc635b1138a549d7ff82425af91aa9db512

URL: https://github.com/llvm/llvm-project/commit/1c53bfc635b1138a549d7ff82425af91aa9db512
DIFF: https://github.com/llvm/llvm-project/commit/1c53bfc635b1138a549d7ff82425af91aa9db512.diff

LOG: [compiler-rt][ASan] Define SANITIZER_INTERCEPT_WCSNLEN  (#164845)

Follow up to #162028

`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is
always used instead of using `REAL(wcsnlen)` if intercepted.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Removed: 
    


################################################################################
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