aboutsummaryrefslogtreecommitdiff
path: root/test/lsan/TestCases/disabler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/lsan/TestCases/disabler.cc')
-rw-r--r--test/lsan/TestCases/disabler.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/lsan/TestCases/disabler.cc b/test/lsan/TestCases/disabler.cc
index f83106501fa3..12e5ffe4d44a 100644
--- a/test/lsan/TestCases/disabler.cc
+++ b/test/lsan/TestCases/disabler.cc
@@ -13,11 +13,13 @@ int main() {
{
__lsan::ScopedDisabler d;
p = new void *;
+ fprintf(stderr, "Test alloc p: %p.\n", p);
}
- *reinterpret_cast<void **>(p) = malloc(666);
+ *p = malloc(666);
void *q = malloc(1337);
- // Break optimization.
- fprintf(stderr, "Test alloc: %p.\n", q);
+ fprintf(stderr, "Test alloc q: %p.\n", q);
return 0;
}
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+
+// CHECK: Test alloc p: [[ADDR:.*]].
+// CHECK-NOT: [[ADDR]]