diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-11-24 18:17:04 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-11-24 18:17:04 +0000 |
commit | 4c0a3372cef1132abb1ad40cf49bd69fcc44b97a (patch) | |
tree | 7b863ec3a30aa73a98de8460f30b0f40c2b57a24 /lib/msan/tests | |
parent | ab388ca3e8807ec9d671b8e797b8f0ba71e2e5fe (diff) |
[compiler-rt] Make the MSAN wmemset intercepter call wmemset instead of memset. Fixes PR 21579
Summary:
Exactly what the title says. I've tested this change against the libc++ test failures and it solves all of them. The check-msan rule also still passes.
I'm not sure why it called memset originally.
I can add tests if requested but currently there are no tests involving wide chars and they are a c++11 features.
Reviewers: kcc, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6352
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/tests')
-rw-r--r-- | lib/msan/tests/msan_test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/msan/tests/msan_test.cc b/lib/msan/tests/msan_test.cc index 12012a05a..84fa9623e 100644 --- a/lib/msan/tests/msan_test.cc +++ b/lib/msan/tests/msan_test.cc @@ -1834,6 +1834,16 @@ TEST(MemorySanitizer, wcsnrtombs) { EXPECT_POISONED(buff[2]); } +TEST(MemorySanitizer, wmemset) { + wchar_t x[25]; + break_optimization(x); + EXPECT_POISONED(x[0]); + wmemset(x, L'A', 10); + EXPECT_EQ(x[0], L'A'); + EXPECT_EQ(x[9], L'A'); + EXPECT_POISONED(x[10]); +} + TEST(MemorySanitizer, mbtowc) { const char *x = "abc"; wchar_t wx; |