From 550fd071edde1ae019e96abebe00d4442b210204 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 2 Dec 2021 17:29:39 -0800 Subject: [PATCH] [lsan] Deflake fork_and_leak test --- compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cpp b/compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cpp index 758cd819f16e..1f54d296e93f 100644 --- a/compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cpp @@ -18,7 +18,8 @@ int main() { assert(WIFEXITED(status)); return WEXITSTATUS(status); } else { - malloc(1337); + for (int i = 0; i < 10; ++i) + malloc(1337); // CHECK: LeakSanitizer: detected memory leaks } return 0;