aboutsummaryrefslogtreecommitdiff
path: root/test/lsan/TestCases/large_allocation_leak.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/lsan/TestCases/large_allocation_leak.cc')
-rw-r--r--test/lsan/TestCases/large_allocation_leak.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lsan/TestCases/large_allocation_leak.cc b/test/lsan/TestCases/large_allocation_leak.cc
index f41143a8a501..9d5698c9f8a6 100644
--- a/test/lsan/TestCases/large_allocation_leak.cc
+++ b/test/lsan/TestCases/large_allocation_leak.cc
@@ -5,14 +5,15 @@
#include <stdio.h>
#include <stdlib.h>
+#include "sanitizer_common/print_address.h"
int main() {
// maxsize in primary allocator is always less than this (1 << 25).
void *large_alloc = malloc(33554432);
- fprintf(stderr, "Test alloc: %p.\n", large_alloc);
+ print_address("Test alloc: ", 1, large_alloc);
return 0;
}
-// CHECK: Test alloc: [[ADDR:.*]].
+// CHECK: Test alloc: [[ADDR:0x[0-9,a-f]+]]
// CHECK: LeakSanitizer: detected memory leaks
// CHECK: [[ADDR]] (33554432 bytes)
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: