[compiler-rt] Enable ASAN checks for wcscat/wcsncat on Windows, and wcscpy/wcsncpy on all platforms (PR #90909)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 14:57:49 PDT 2024


================
@@ -65,6 +65,15 @@ static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) {
   return internal_strnlen(s, maxlen);
 }
 
+static inline uptr MaybeRealWcsnlen(const wchar_t *s, uptr maxlen) {
+#  if SANITIZER_INTERCEPT_STRNLEN
+  if (REAL(wcsnlen)) {
----------------
vitalybuka wrote:

this code does not `{}` in cases like this

https://github.com/llvm/llvm-project/pull/90909


More information about the llvm-commits mailing list