1 // RUN: %clangxx_lsan -O2 %s --std=c++14 -o %t && %run %t
5 #include <sanitizer/lsan_interface.h>
9 std::atomic
<bool> done
;
12 std::unique_ptr
<char[]> mem
;
15 mem
.reset(new char[1000000]);
19 std::vector
<std::thread
> threads
;
20 for (int i
= 0; i
< 10; ++i
)
21 threads
.emplace_back(foo
);
23 for (int i
= 0; i
< 100; ++i
)
24 __lsan_do_recoverable_leak_check();
27 for (auto &t
: threads
)