diff options
Diffstat (limited to 'test/lsan/TestCases/use_tls_dynamic.cc')
-rw-r--r-- | test/lsan/TestCases/use_tls_dynamic.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lsan/TestCases/use_tls_dynamic.cc b/test/lsan/TestCases/use_tls_dynamic.cc index 207894b0fffd4..927c5c4f768ea 100644 --- a/test/lsan/TestCases/use_tls_dynamic.cc +++ b/test/lsan/TestCases/use_tls_dynamic.cc @@ -12,6 +12,7 @@ #include <stdio.h> #include <stdlib.h> #include <string> +#include "sanitizer_common/print_address.h" int main(int argc, char *argv[]) { std::string path = std::string(argv[0]) + "-so.so"; @@ -26,10 +27,10 @@ int main(int argc, char *argv[]) { // If we don't know about dynamic TLS, we will return a false leak above. void **p_in_tls = StoreToTLS(p); assert(*p_in_tls == p); - fprintf(stderr, "Test alloc: %p.\n", p); + print_address("Test alloc: ", 1, p); return 0; } -// 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: |