[llvm-commits] [compiler-rt] r165934 - /compiler-rt/trunk/lib/asan/tests/asan_test.cc
Kostya Serebryany
kcc at google.com
Mon Oct 15 06:30:38 PDT 2012
Author: kcc
Date: Mon Oct 15 08:30:38 2012
New Revision: 165934
URL: http://llvm.org/viewvc/llvm-project?rev=165934&view=rev
Log:
[asan] fix more tests
Modified:
compiler-rt/trunk/lib/asan/tests/asan_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=165934&r1=165933&r2=165934&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Oct 15 08:30:38 2012
@@ -300,7 +300,7 @@
}
TEST(AddressSanitizer, UAF_char) {
- const char *uaf_string = "AddressSanitizer.*heap-use-after-free";
+ const char *uaf_string = "AddressSanitizer:.*heap-use-after-free";
EXPECT_DEATH(uaf_test<U1>(1, 0), uaf_string);
EXPECT_DEATH(uaf_test<U1>(10, 0), uaf_string);
EXPECT_DEATH(uaf_test<U1>(10, 10), uaf_string);
@@ -357,7 +357,7 @@
#if ASAN_NEEDS_SEGV
namespace {
-const char kUnknownCrash[] = "AddressSanitizer crashed on unknown address";
+const char kUnknownCrash[] = "AddressSanitizer: SEGV on unknown address";
const char kOverriddenHandler[] = "ASan signal handler has been overridden\n";
TEST(AddressSanitizer, WildAddressTest) {
@@ -503,7 +503,7 @@
#ifndef __APPLE__
static const char *kMallocUsableSizeErrorMsg =
- "AddressSanitizer attempting to call malloc_usable_size()";
+ "AddressSanitizer: attempting to call malloc_usable_size()";
TEST(AddressSanitizer, MallocUsableSizeTest) {
const size_t kArraySize = 100;
@@ -529,7 +529,7 @@
TEST(AddressSanitizer, WrongFreeTest) {
EXPECT_DEATH(WrongFree(),
- "ERROR: AddressSanitizer attempting free.*not malloc");
+ "ERROR: AddressSanitizer: attempting free.*not malloc");
}
void DoubleFree() {
@@ -543,7 +543,7 @@
TEST(AddressSanitizer, DoubleFreeTest) {
EXPECT_DEATH(DoubleFree(), ASAN_PCRE_DOTALL
- "ERROR: AddressSanitizer attempting double-free"
+ "ERROR: AddressSanitizer: attempting double-free"
".*is located 0 bytes inside of 400-byte region"
".*freed by thread T0 here"
".*previously allocated by thread T0 here");
@@ -753,7 +753,7 @@
assert(((uintptr_t)p % 16) == 0);
__m128i value_wide = _mm_set1_epi16(0x1234);
EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
- "AddressSanitizer heap-buffer-overflow");
+ "AddressSanitizer: heap-buffer-overflow");
EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
"WRITE of size 16");
EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
@@ -1615,7 +1615,7 @@
#else
char *addr = (char*)0x0000100000080000;
#endif
- EXPECT_DEATH(*addr = 1, "AddressSanitizer crashed on unknown");
+ EXPECT_DEATH(*addr = 1, "AddressSanitizer: SEGV on unknown");
}
#endif // ASAN_NEEDS_SEGV
@@ -1717,7 +1717,7 @@
// Call 'f' a few more times, 'p' should still be poisoned.
for (int i = 0; i < 32; i++)
f();
- EXPECT_DEATH(*p = 1, "AddressSanitizer stack-use-after-return");
+ EXPECT_DEATH(*p = 1, "AddressSanitizer: stack-use-after-return");
EXPECT_DEATH(*p = 1, "is located.*in frame .*ReturnsPointerToALocal");
}
#endif
@@ -1917,7 +1917,7 @@
delete [] (Ident(new char [8644]));
}
char *x = new char[8192];
- EXPECT_DEATH(x[Ident(8192)] = 0, "AddressSanitizer heap-buffer-overflow");
+ EXPECT_DEATH(x[Ident(8192)] = 0, "AddressSanitizer: heap-buffer-overflow");
delete [] Ident(x);
}
More information about the llvm-commits
mailing list