[PATCH] D59548: [Sanitizer] Add interceptor for wctomb
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 11:12:43 PDT 2019
vitalybuka added inline comments.
================
Comment at: lib/msan/tests/msan_test.cc:2126
+TEST(MemorySanitizer, wctomb) {
+ wchar_t x = L'a';
----------------
Please also create sanitizer_common lit tests just to make sure that function still works
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:3549
+ // its metadata. See
+ // https://github.com/google/sanitizers/issues/321.
+ int res = REAL(wctomb)(dest, src);
----------------
I don't like that we add another FIXME here
Could you try to make something similar to https://reviews.llvm.org/rL211153
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:3552
+ if (res != -1 && dest) {
+ SIZE_T write_cnt = res;
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, write_cnt);
----------------
write_cnt is not needed
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59548/new/
https://reviews.llvm.org/D59548
More information about the llvm-commits
mailing list