diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp index 5b3a99adfea7c..1a018a891b56e 100644 --- a/compiler-rt/lib/hwasan/hwasan_report.cpp +++ b/compiler-rt/lib/hwasan/hwasan_report.cpp @@ -260,16 +260,15 @@ static void PrintStackAllocations(const StackAllocationsRingBuffer *sa, Printf("Cause: %s\n", cause); Printf("%s", d.Default()); Printf("%s", d.Location()); - Printf("%p is located %zd bytes %s a %zd-byte region [%p,%p)\n", - untagged_addr, offset, whence, local_end - local_beg, local_beg, - local_end); - Printf("%s", d.Allocation()); StackTracePrinter::GetOrInit()->RenderSourceLocation( &location, local.decl_file, local.decl_line, /* column= */ 0, common_flags()->symbolize_vs_style, common_flags()->strip_path_prefix); - Printf(" %s in %s %s\n", local.name, local.function_name, - location.data()); + Printf( + "%p is located %zd bytes %s a %zd-byte local variable %s [%p,%p) " + "in %s %s\n", + untagged_addr, offset, whence, local_end - local_beg, local.name, + local_beg, local_end, local.function_name, location.data()); location.clear(); Printf("%s\n", d.Default()); } diff --git a/compiler-rt/test/hwasan/TestCases/stack-overflow.c b/compiler-rt/test/hwasan/TestCases/stack-overflow.c index 10e8d9c59e4bb..4af506e3ecf45 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-overflow.c +++ b/compiler-rt/test/hwasan/TestCases/stack-overflow.c @@ -17,8 +17,7 @@ int main() { // CHECK: is located in stack of thread // CHECK: Potentially referenced stack objects: // CHECK: Cause: stack-buffer-overflow - // CHECK-NEXT: 0x{{.*}} is located 1 bytes after a 64-byte region - // CHECK-NEXT: c in buggy {{.*}}stack-overflow.c: + // CHECK-NEXT: 0x{{.*}} is located 1 bytes after a 64-byte local variable c [0x{{.*}},0x{{.*}}) in buggy {{.*}}stack-overflow.c: // CHECK: Memory tags around the buggy address // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in buggy diff --git a/compiler-rt/test/hwasan/TestCases/stack-uar-dynamic.c b/compiler-rt/test/hwasan/TestCases/stack-uar-dynamic.c index 7a2a11593e7af..14b9cba8aa5e4 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-uar-dynamic.c +++ b/compiler-rt/test/hwasan/TestCases/stack-uar-dynamic.c @@ -22,7 +22,6 @@ int main() { char *p = buggy(1); // CHECK: Potentially referenced stack objects: // CHECK-NEXT: use-after-scope - // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 64-byte region - // CHECK-NEXT: c in buggy + // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 64-byte local variable c [0x{{.*}},0x{{.*}}) in buggy p[0] = 0; } diff --git a/compiler-rt/test/hwasan/TestCases/stack-uar.c b/compiler-rt/test/hwasan/TestCases/stack-uar.c index 8810701f0c9ca..9fd4381a8049e 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-uar.c +++ b/compiler-rt/test/hwasan/TestCases/stack-uar.c @@ -51,8 +51,7 @@ int main() { // CHECK: is located in stack of thread // CHECK: Potentially referenced stack objects: // CHECK: Cause: use-after-scope - // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 2048-byte region - // CHECK-NEXT: {{zzz|yyy}} in buggy {{.*}}stack-uar.c: + // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 2048-byte local variable {{zzz|yyy}} [0x{{.*}},0x{{.*}}) in buggy {{.*}}stack-uar.c: // CHECK: Memory tags around the buggy address // NOSYM: Previously allocated frames: diff --git a/compiler-rt/test/hwasan/TestCases/stack-uas.c b/compiler-rt/test/hwasan/TestCases/stack-uas.c index 53a7054c1c435..a0e4eb02dd226 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-uas.c +++ b/compiler-rt/test/hwasan/TestCases/stack-uas.c @@ -70,8 +70,7 @@ int main() { // CHECK: is located in stack of thread // CHECK: Potentially referenced stack objects: // CHECK: Cause: use-after-scope - // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 2048-byte region - // CHECK-NEXT: {{zzz|yyy}} in buggy {{.*}}stack-uas.c: + // CHECK-NEXT: 0x{{.*}} is located 0 bytes inside a 2048-byte local variable {{zzz|yyy}} [0x{{.*}}) in buggy {{.*}}stack-uas.c: // CHECK: Memory tags around the buggy address // NOSYM: Previously allocated frames: diff --git a/compiler-rt/test/hwasan/TestCases/stack-underflow.c b/compiler-rt/test/hwasan/TestCases/stack-underflow.c index 8e5174519272f..e13955ed37b41 100644 --- a/compiler-rt/test/hwasan/TestCases/stack-underflow.c +++ b/compiler-rt/test/hwasan/TestCases/stack-underflow.c @@ -17,8 +17,7 @@ int main() { // CHECK: is located in stack of thread // CHECK: Potentially referenced stack objects: // CHECK: Cause: stack-buffer-overflow - // CHECK-NEXT: 0x{{.*}} is located 2 bytes before a 64-byte region - // CHECK-NEXT: c in buggy {{.*}}stack-underflow.c: + // CHECK-NEXT: 0x{{.*}} is located 2 bytes before a 64-byte local variable c [0x{{.*}},0x{{.*}}) in buggy {{.*}}stack-underflow.c: // CHECK: Memory tags around the buggy address // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in buggy diff --git a/compiler-rt/test/hwasan/TestCases/strip_path_prefix.c b/compiler-rt/test/hwasan/TestCases/strip_path_prefix.c index 5e41d03b683e9..5fa31f95b5567 100644 --- a/compiler-rt/test/hwasan/TestCases/strip_path_prefix.c +++ b/compiler-rt/test/hwasan/TestCases/strip_path_prefix.c @@ -26,5 +26,5 @@ int main() { // CHECK: READ of size 1 at // CHECK: #0 {{.*}} in main strip_path_prefix.c:[[@LINE-2]] // CHECK: Potentially referenced stack objects: - // CHECK: zzz in buggy strip_path_prefix.c:[[@LINE-12]] + // CHECK: in buggy strip_path_prefix.c:[[@LINE-12]] }