[compiler-rt] efaa529 - [sanitizer_common] Use internal_memcpy with wcrtomb/wctomb interceptors (#138623)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 06:23:18 PDT 2025
Author: Jake Egan
Date: 2025-05-06T09:23:14-04:00
New Revision: efaa5295d4103da50f25bb29e42647d7a48b2e9e
URL: https://github.com/llvm/llvm-project/commit/efaa5295d4103da50f25bb29e42647d7a48b2e9e
DIFF: https://github.com/llvm/llvm-project/commit/efaa5295d4103da50f25bb29e42647d7a48b2e9e.diff
LOG: [sanitizer_common] Use internal_memcpy with wcrtomb/wctomb interceptors (#138623)
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 5a15d75f0c86a..d0f9846adc2df 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -3917,7 +3917,7 @@ INTERCEPTOR(SIZE_T, wcrtomb, char *dest, wchar_t src, void *ps) {
if (res != ((SIZE_T)-1)) {
CHECK_LE(res, sizeof(local_dest));
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
- REAL(memcpy)(dest, local_dest, res);
+ internal_memcpy(dest, local_dest, res);
}
return res;
}
@@ -3939,7 +3939,7 @@ INTERCEPTOR(int, wctomb, char *dest, wchar_t src) {
if (res != -1) {
CHECK_LE(res, sizeof(local_dest));
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
- REAL(memcpy)(dest, local_dest, res);
+ internal_memcpy(dest, local_dest, res);
}
return res;
}
More information about the llvm-commits
mailing list