summaryrefslogtreecommitdiff
path: root/test/lsan/TestCases/pointer_to_self.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/lsan/TestCases/pointer_to_self.cc')
-rw-r--r--test/lsan/TestCases/pointer_to_self.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lsan/TestCases/pointer_to_self.cc b/test/lsan/TestCases/pointer_to_self.cc
index 63bde2ccf35d..40c122811f18 100644
--- a/test/lsan/TestCases/pointer_to_self.cc
+++ b/test/lsan/TestCases/pointer_to_self.cc
@@ -6,13 +6,14 @@
#include <stdio.h>
#include <stdlib.h>
+#include "sanitizer_common/print_address.h"
int main() {
void *p = malloc(1337);
*reinterpret_cast<void **>(p) = p;
- fprintf(stderr, "Test alloc: %p.\n", p);
+ print_address("Test alloc: ", 1, p);
}
-// CHECK: Test alloc: [[ADDR:.*]].
+// CHECK: Test alloc: [[ADDR:0x[0-9,a-f]+]]
// CHECK: LeakSanitizer: detected memory leaks
// CHECK: [[ADDR]] (1337 bytes)
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: