From 678f88e0e23f68c3e0f3d45c8b62ce4d3f1c10f6 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 15 Mar 2022 18:01:07 -0700 Subject: [PATCH] [lsan] Attempt to fix s390x after a63932a8 --- compiler-rt/test/lsan/TestCases/Linux/dso-unknown.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler-rt/test/lsan/TestCases/Linux/dso-unknown.cpp b/compiler-rt/test/lsan/TestCases/Linux/dso-unknown.cpp index 2294ab81fdf9..c3eede705fee 100644 --- a/compiler-rt/test/lsan/TestCases/Linux/dso-unknown.cpp +++ b/compiler-rt/test/lsan/TestCases/Linux/dso-unknown.cpp @@ -2,7 +2,7 @@ // Test that origin tracking is enabled at runtime. // RUN: %clangxx_lsan -O0 %s -DBUILD_SO -fPIC -shared -o %t-so.so // RUN: %clangxx_lsan -O0 %s -ldl -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_lsan -O0 %s -ldl -o %t -DSUPPRESS_LEAK && %run %t 2>&1 +// RUN: %clangxx_lsan -O0 %s -ldl -o %t -DSUPPRESS_LEAK && %run %t #ifdef BUILD_SO @@ -25,7 +25,6 @@ extern "C" const char *__lsan_default_suppressions() { } # endif -void *p; int main(int argc, char **argv) { std::string path = std::string(argv[0]) + "-so.so"; @@ -37,9 +36,8 @@ int main(int argc, char **argv) { typedef void *(*fn)(unsigned sz); fn my_alloc = (fn)dlsym(handle, "my_alloc"); - p = my_alloc(1); - p = my_alloc(2); - p = my_alloc(3); + for (int i = 0; i < 100; ++i) + my_alloc(i); dlclose(handle); return 0;