[asan] change the asan output slightly to avoid user confusion: a) add ':' after...
authorKostya Serebryany <kcc@google.com>
Mon, 15 Oct 2012 13:04:58 +0000 (13:04 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 15 Oct 2012 13:04:58 +0000 (13:04 +0000)
llvm-svn: 165932

compiler-rt/lib/asan/asan_report.cc
compiler-rt/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
compiler-rt/lib/asan/lit_tests/deep_stack_uaf.cc
compiler-rt/lib/asan/lit_tests/deep_tail_call.cc
compiler-rt/lib/asan/lit_tests/deep_thread_stack.cc
compiler-rt/lib/asan/lit_tests/initialization-bug.cc
compiler-rt/lib/asan/lit_tests/large_func_test.cc
compiler-rt/lib/asan/lit_tests/memcmp_test.cc
compiler-rt/lib/asan/lit_tests/null_deref.cc
compiler-rt/lib/asan/lit_tests/shared-lib-test.cc
compiler-rt/lib/asan/lit_tests/use-after-free.cc

index 4b7baa6..2fbf8fd 100644 (file)
@@ -322,7 +322,7 @@ class ScopedInErrorReport {
 
 void ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer crashed on unknown address %p"
+  Report("ERROR: AddressSanitizer: SEGV on unknown address %p"
              " (pc %p sp %p bp %p T%d)\n",
              (void*)addr, (void*)pc, (void*)sp, (void*)bp,
              asanThreadRegistry().GetCurrentTidOrInvalid());
@@ -333,14 +333,14 @@ void ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr) {
 
 void ReportDoubleFree(uptr addr, StackTrace *stack) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer attempting double-free on %p:\n", addr);
+  Report("ERROR: AddressSanitizer: attempting double-free on %p:\n", addr);
   PrintStack(stack);
   DescribeHeapAddress(addr, 1);
 }
 
 void ReportFreeNotMalloced(uptr addr, StackTrace *stack) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer attempting free on address "
+  Report("ERROR: AddressSanitizer: attempting free on address "
              "which was not malloc()-ed: %p\n", addr);
   PrintStack(stack);
   DescribeHeapAddress(addr, 1);
@@ -348,7 +348,7 @@ void ReportFreeNotMalloced(uptr addr, StackTrace *stack) {
 
 void ReportMallocUsableSizeNotOwned(uptr addr, StackTrace *stack) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer attempting to call "
+  Report("ERROR: AddressSanitizer: attempting to call "
              "malloc_usable_size() for pointer which is "
              "not owned: %p\n", addr);
   PrintStack(stack);
@@ -357,7 +357,7 @@ void ReportMallocUsableSizeNotOwned(uptr addr, StackTrace *stack) {
 
 void ReportAsanGetAllocatedSizeNotOwned(uptr addr, StackTrace *stack) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer attempting to call "
+  Report("ERROR: AddressSanitizer: attempting to call "
              "__asan_get_allocated_size() for pointer which is "
              "not owned: %p\n", addr);
   PrintStack(stack);
@@ -368,7 +368,7 @@ void ReportStringFunctionMemoryRangesOverlap(
     const char *function, const char *offset1, uptr length1,
     const char *offset2, uptr length2, StackTrace *stack) {
   ScopedInErrorReport in_report;
-  Report("ERROR: AddressSanitizer %s-param-overlap: "
+  Report("ERROR: AddressSanitizer: %s-param-overlap: "
              "memory ranges [%p,%p) and [%p, %p) overlap\n", \
              function, offset1, offset1 + length1, offset2, offset2 + length2);
   PrintStack(stack);
@@ -461,7 +461,7 @@ void __asan_report_error(uptr pc, uptr bp, uptr sp,
     }
   }
 
-  Report("ERROR: AddressSanitizer %s on address "
+  Report("ERROR: AddressSanitizer: %s on address "
              "%p at pc 0x%zx bp 0x%zx sp 0x%zx\n",
              bug_descr, (void*)addr, pc, bp, sp);
 
index 00292ce..6405d3c 100644 (file)
@@ -20,7 +20,7 @@
 extern int y;
 int __attribute__((noinline)) initX() {
   return y + 1;
-  // CHECK: {{AddressSanitizer initialization-order-fiasco}}
+  // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
   // CHECK: {{READ of size .* at 0x.* thread T0}}
   // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cc:22}}
   // CHECK: {{0x.* is located 0 bytes inside of global variable .*y.*}}
index 17d0a33..e4481be 100644 (file)
@@ -29,7 +29,7 @@ int main() {
   // deep_free(x);
   DeepFree<200>::free(x);
   return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer heap-use-after-free on address}}
+  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK: DeepFree<36>
   // CHECK: DeepFree<98>
   // CHECK: DeepFree<115>
index 8f8a5d2..6aa15e8 100644 (file)
@@ -7,7 +7,7 @@
 // RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 // RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// CHECK: AddressSanitizer global-buffer-overflow
+// CHECK: AddressSanitizer: global-buffer-overflow
 int global[10];
 // CHECK: {{#0.*call4}}
 void __attribute__((noinline)) call4(int i) { global[i+10]++; }
index 810f4e4..781508d 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
   return (x != 0);
 }
 
-// CHECK: AddressSanitizer heap-use-after-free
+// CHECK: AddressSanitizer: heap-use-after-free
 // CHECK: WRITE of size 4 at 0x{{.*}} thread T[[ACCESS_THREAD:[0-9]+]]
 // CHECK: freed by thread T[[FREE_THREAD:[0-9]+]] here:
 // CHECK: previously allocated by thread T[[ALLOC_THREAD:[0-9]+]] here:
index 5a9748c..90e4db9 100644 (file)
@@ -30,7 +30,7 @@ int z = initZ();
 extern int y;
 int __attribute__((noinline)) initX() {
   return y + 1;
-  // CHECK: {{AddressSanitizer initialization-order-fiasco}}
+  // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
   // CHECK: {{READ of size .* at 0x.* thread T0}}
   // CHECK: {{0x.* is located 0 bytes inside of global variable .*(y|z).*}}
 }
index d54ad76..f67b150 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char **argv) {
   delete x;
 }
 
-// CHECK: {{.*ERROR: AddressSanitizer heap-buffer-overflow on address}}
+// CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}}
 // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
 // CHECK: {{READ of size 4 at 0x.* thread T0}}
 
index d839c20..ac3f7f3 100644 (file)
@@ -12,7 +12,7 @@ int main(int argc, char **argv) {
   char a1[] = {argc, 2, 3, 4};
   char a2[] = {1, 2*argc, 3, 4};
   int res = memcmp(a1, a2, 4 + argc);  // BOOM
-  // CHECK: AddressSanitizer stack-buffer-overflow
+  // CHECK: AddressSanitizer: stack-buffer-overflow
   // CHECK: {{#0.*memcmp}}
   // CHECK: {{#1.*main}}
   return res;
index 7ebf71a..64aec12 100644 (file)
@@ -23,7 +23,7 @@ int main() {
   NullDeref((int*)0);
 }
 
-// CHECK: {{.*ERROR: AddressSanitizer crashed on unknown address}}
+// CHECK: ERROR: AddressSanitizer: SEGV on unknown address
 // CHECK:   {{0x0*00028 .*pc 0x.*}}
 // CHECK: {{AddressSanitizer can not provide additional info.}}
 
index 28a4e63..fdda352 100644 (file)
@@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
   printf("ok\n");
   inc(1);
   inc(-1);  // BOOM
-  // CHECK: {{.*ERROR: AddressSanitizer global-buffer-overflow}}
+  // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}
   // CHECK: {{READ of size 4 at 0x.* thread T0}}
   // CHECK: {{    #0 0x.*}}
   // CHECK: {{    #1 0x.* in _?main .*shared-lib-test.cc:48}}
index 841d7d3..0ab8e09 100644 (file)
@@ -20,7 +20,7 @@ int main() {
   char *x = (char*)malloc(10 * sizeof(char));
   free(x);
   return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer heap-use-after-free on address}}
+  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
   // CHECK: {{    #0 0x.* in _?main .*use-after-free.cc:22}}