diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp --- a/compiler-rt/lib/hwasan/hwasan_report.cpp +++ b/compiler-rt/lib/hwasan/hwasan_report.cpp @@ -485,7 +485,7 @@ if (num_descriptions_printed > 1) { Printf( "There are %d potential causes, printed above in order " - "of likeliness.", + "of likeliness.\n", num_descriptions_printed); } } diff --git a/compiler-rt/test/hwasan/TestCases/stack-oob.c b/compiler-rt/test/hwasan/TestCases/stack-oob.c --- a/compiler-rt/test/hwasan/TestCases/stack-oob.c +++ b/compiler-rt/test/hwasan/TestCases/stack-oob.c @@ -15,17 +15,13 @@ #include #include -__attribute__((noinline)) -int f() { - char z[SIZE]; +int main() { char z[SIZE]; char *volatile p = z; - return p[SIZE]; -} - -int main() { - f(); + char x; + char *volatile sink = &x; + *sink = p[SIZE]; // CHECK: READ of size 1 at - // CHECK: #0 {{.*}} in f{{.*}}stack-oob.c:[[@LINE-6]] + // CHECK: #0 {{.*}} in f{{.*}}stack-oob.c:[[@LINE-2]] // CHECK: Cause: stack tag-mismatch // CHECK: is located in stack of threa