From 6ca5fa7aac5623a03240fee79522fcfdebbfbcfd Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 8 Jan 2024 16:04:03 -0800 Subject: [test][hwasan] Test function name in summaries (#77391) --- .../hwasan/TestCases/Linux/aligned_alloc-alignment.cpp | 2 +- .../test/hwasan/TestCases/Linux/pvalloc-overflow.cpp | 2 +- .../hwasan/TestCases/Posix/posix_memalign-alignment.cpp | 2 +- .../test/hwasan/TestCases/allocator_returns_null.cpp | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp b/compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp index 429760b..ad5b761 100644 --- a/compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp +++ b/compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp @@ -14,7 +14,7 @@ int main() { // CHECK: ERROR: HWAddressSanitizer: invalid alignment requested in aligned_alloc: 17 // CHECK: {{#0 0x.* in .*}}{{aligned_alloc|memalign}} // CHECK: {{#1 0x.* in main .*aligned_alloc-alignment.cpp:}}[[@LINE-3]] - // CHECK: SUMMARY: HWAddressSanitizer: invalid-aligned-alloc-alignment + // CHECK: SUMMARY: HWAddressSanitizer: invalid-aligned-alloc-alignment {{.*}} in aligned_alloc printf("pointer after failed aligned_alloc: %zd\n", (size_t)p); // CHECK-NULL: pointer after failed aligned_alloc: 0 diff --git a/compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp b/compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp index b0b1ed3..bd9f34a 100644 --- a/compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp +++ b/compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp @@ -39,6 +39,6 @@ int main(int argc, char *argv[]) { // CHECK: {{ERROR: HWAddressSanitizer: pvalloc parameters overflow: size .* rounded up to system page size .* cannot be represented in type size_t}} // CHECK: {{#0 0x.* in .*pvalloc}} // CHECK: {{#1 0x.* in main .*pvalloc-overflow.cpp:}} -// CHECK: SUMMARY: HWAddressSanitizer: pvalloc-overflow +// CHECK: SUMMARY: HWAddressSanitizer: pvalloc-overflow {{.*}} in pvalloc // CHECK-NULL: errno: 12 diff --git a/compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp b/compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp index eb9355f..029e086 100644 --- a/compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp +++ b/compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp @@ -11,7 +11,7 @@ int main() { // CHECK: ERROR: HWAddressSanitizer: invalid alignment requested in posix_memalign: 17 // CHECK: {{#0 0x.* in .*posix_memalign}} // CHECK: {{#1 0x.* in main .*posix_memalign-alignment.cpp:}}[[@LINE-3]] - // CHECK: SUMMARY: HWAddressSanitizer: invalid-posix-memalign-alignment + // CHECK: SUMMARY: HWAddressSanitizer: invalid-posix-memalign-alignment {{.*}} in posix_memalign printf("pointer after failed posix_memalign: %zd\n", (size_t)p); // CHECK-NULL: pointer after failed posix_memalign: 42 diff --git a/compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp b/compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp index aa98076..18ee940 100644 --- a/compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp +++ b/compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp @@ -87,21 +87,21 @@ int main(int argc, char **argv) { } // CHECK-mCRASH: malloc: -// CHECK-mCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-mCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in malloc // CHECK-cCRASH: calloc: -// CHECK-cCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-cCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in calloc // CHECK-coCRASH: calloc-overflow: -// CHECK-coCRASH: SUMMARY: HWAddressSanitizer: calloc-overflow +// CHECK-coCRASH: SUMMARY: HWAddressSanitizer: calloc-overflow {{.*}} in calloc // CHECK-rCRASH: realloc: -// CHECK-rCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-rCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in realloc // CHECK-mrCRASH: realloc-after-malloc: -// CHECK-mrCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-mrCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in realloc // CHECK-nCRASH: new: -// CHECK-nCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-nCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in operator new // CHECK-nCRASH-OOM: new: -// CHECK-nCRASH-OOM: SUMMARY: HWAddressSanitizer: out-of-memory +// CHECK-nCRASH-OOM: SUMMARY: HWAddressSanitizer: out-of-memory {{.*}} in operator new // CHECK-nnCRASH: new-nothrow: -// CHECK-nnCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big +// CHECK-nnCRASH: SUMMARY: HWAddressSanitizer: allocation-size-too-big {{.*}} in operator new // CHECK-mNULL: malloc: // CHECK-mNULL: errno: 12 -- cgit v1.1