Skip to content

Conversation

@zacklj89
Copy link
Contributor

Follow up to #162028

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

@llvmbot
Copy link
Member

llvmbot commented Oct 23, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Zack Johnson (zacklj89)

Changes

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

Copy link
Contributor

@thurstond thurstond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice catch!

@zacklj89 zacklj89 merged commit 1c53bfc into main Oct 23, 2025
13 checks passed
@zacklj89 zacklj89 deleted the users/zacklj89/add-wcsnlen-def branch October 23, 2025 17:16
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Follow up to llvm#162028

`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is
always used instead of using `REAL(wcsnlen)` if intercepted.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
Follow up to llvm#162028

`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is
always used instead of using `REAL(wcsnlen)` if intercepted.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
Follow up to llvm#162028

`SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is
always used instead of using `REAL(wcsnlen)` if intercepted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants