[compiler-rt] r320251 - Update sanitizer tests for C++14 default in Clang
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 9 05:35:52 PST 2017
Author: tnorthover
Date: Sat Dec 9 05:35:52 2017
New Revision: 320251
URL: http://llvm.org/viewvc/llvm-project?rev=320251&view=rev
Log:
Update sanitizer tests for C++14 default in Clang
Modified:
compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc
compiler-rt/trunk/test/msan/msan_print_shadow3.cc
Modified: compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc?rev=320251&r1=320250&r2=320251&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc Sat Dec 9 05:35:52 2017
@@ -7,8 +7,8 @@
#include <string.h>
int main(int argc, char **argv) {
- char a1[] = {argc, 2, 3, 4};
- char a2[] = {1, 2*argc, 3, 4};
+ char a1[] = {static_cast<char>(argc), 2, 3, 4};
+ char a2[] = {1, static_cast<char>(2*argc), 3, 4};
int res = memcmp(a1, a2, 4 + argc); // BOOM
// CHECK: AddressSanitizer: stack-buffer-overflow
// CHECK: {{#0.*memcmp}}
Modified: compiler-rt/trunk/test/msan/msan_print_shadow3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/msan_print_shadow3.cc?rev=320251&r1=320250&r2=320251&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/msan_print_shadow3.cc (original)
+++ compiler-rt/trunk/test/msan/msan_print_shadow3.cc Sat Dec 9 05:35:52 2017
@@ -6,11 +6,11 @@
int main(void) {
unsigned long long x = 0; // For 8-byte alignment.
- char x_s[4] = {0x87, 0x65, 0x43, 0x21};
+ char x_s[4] = {0x77, 0x65, 0x43, 0x21};
__msan_partial_poison(&x, &x_s, sizeof(x_s));
__msan_print_shadow(&x, sizeof(x_s));
return 0;
}
// CHECK: Shadow map of [{{.*}}), 4 bytes:
-// CHECK: 0x{{.*}}: 87654321 ........ ........ ........
+// CHECK: 0x{{.*}}: 77654321 ........ ........ ........
More information about the llvm-commits
mailing list