[llvm-commits] [compiler-rt] r165932 - in /compiler-rt/trunk/lib/asan: asan_report.cc lit_tests/Linux/initialization-bug-any-order.cc lit_tests/deep_stack_uaf.cc lit_tests/deep_tail_call.cc lit_tests/deep_thread_stack.cc lit_tests/initialization-bug.cc lit_tests/large_func_test.cc lit_tests/memcmp_test.cc lit_tests/null_deref.cc lit_tests/shared-lib-test.cc lit_tests/use-after-free.cc
Kostya Serebryany
kcc at google.com
Mon Oct 15 06:04:59 PDT 2012
Author: kcc
Date: Mon Oct 15 08:04:58 2012
New Revision: 165932
URL: http://llvm.org/viewvc/llvm-project?rev=165932&view=rev
Log:
[asan] change the asan output slightly to avoid user confusion: a) add ':' after 'AddressSanitizer' and b) changed 'crashed' to 'SEGV'
Modified:
compiler-rt/trunk/lib/asan/asan_report.cc
compiler-rt/trunk/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc
compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc
compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc
compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc
compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc
compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc
compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc
compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc
compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc
Modified: compiler-rt/trunk/lib/asan/asan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Mon Oct 15 08:04:58 2012
@@ -322,7 +322,7 @@
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 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 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 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 @@
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 @@
}
}
- 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);
Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc Mon Oct 15 08:04:58 2012
@@ -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.*}}
Modified: compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc Mon Oct 15 08:04:58 2012
@@ -29,7 +29,7 @@
// 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>
Modified: compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc Mon Oct 15 08:04:58 2012
@@ -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]++; }
Modified: compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc Mon Oct 15 08:04:58 2012
@@ -49,7 +49,7 @@
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:
Modified: compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc Mon Oct 15 08:04:58 2012
@@ -30,7 +30,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: {{0x.* is located 0 bytes inside of global variable .*(y|z).*}}
}
Modified: compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc Mon Oct 15 08:04:58 2012
@@ -49,7 +49,7 @@
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}}
Modified: compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc Mon Oct 15 08:04:58 2012
@@ -12,7 +12,7 @@
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;
Modified: compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc Mon Oct 15 08:04:58 2012
@@ -23,7 +23,7 @@
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.}}
Modified: compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc Mon Oct 15 08:04:58 2012
@@ -46,7 +46,7 @@
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}}
Modified: compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc?rev=165932&r1=165931&r2=165932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc Mon Oct 15 08:04:58 2012
@@ -20,7 +20,7 @@
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}}
More information about the llvm-commits
mailing list