summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-01-08 16:04:03 -0800
committerGitHub <noreply@github.com>2024-01-08 16:04:03 -0800
commit6ca5fa7aac5623a03240fee79522fcfdebbfbcfd (patch)
tree0017183f778696e70f3d82b23c824cc70e77b665
parent2796b403f9dc81fe1fccc886b4e9ea3f4208ade2 (diff)
[test][hwasan] Test function name in summaries (#77391)upstream/users/vitalybuka/spr/main.testhwasan-test-function-name-in-summaries
-rw-r--r--compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp2
-rw-r--r--compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp2
-rw-r--r--compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp2
-rw-r--r--compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp16
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 429760ba0e19..ad5b7616e8a7 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 b0b1ed3b798c..bd9f34a0dac9 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 eb9355f6da72..029e086f99ad 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 aa98076bf91e..18ee9406d146 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