[Mlir-commits] [mlir] 50cd2c2 - [LSAN] Disable leaks in test using environment variables instead of not running them with ASAN.

Kirill Stoimenov llvmlistbot at llvm.org
Wed Mar 8 15:20:51 PST 2023


Author: Kirill Stoimenov
Date: 2023-03-08T23:20:40Z
New Revision: 50cd2c257cb4e5fc822e0fa5fc12d1838070fcf0

URL: https://github.com/llvm/llvm-project/commit/50cd2c257cb4e5fc822e0fa5fc12d1838070fcf0
DIFF: https://github.com/llvm/llvm-project/commit/50cd2c257cb4e5fc822e0fa5fc12d1838070fcf0.diff

LOG: [LSAN] Disable leaks in test using environment variables instead of not running them with ASAN.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D145615

Added: 
    

Modified: 
    clang/test/CodeGenCXX/debug-info-enum-i128.cpp
    mlir/test/Pass/crash-recovery-dynamic-failure.mlir
    mlir/test/Pass/crash-recovery.mlir
    mlir/test/mlir-cpu-runner/async-group.mlir

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp b/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
index 92bf8eba873c3..22aaf03bd9af5 100644
--- a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
+++ b/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
@@ -1,9 +1,10 @@
+// FIXME: llvm.org/pr51221, the APSInt leaks
+// RUN: export LSAN_OPTIONS=detect_leaks=0
+
 // RUN: %clang_cc1 %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
 // RUN: %clang_cc1 %s -triple x86_64-linux-gnu -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
 // RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
 
-// FIXME: llvm.org/pr51221, the APSInt leaks
-// UNSUPPORTED: asan
 
 enum class uns : __uint128_t { unsval = __uint128_t(1) << 64 };
 uns t1() { return uns::unsval; }

diff  --git a/mlir/test/Pass/crash-recovery-dynamic-failure.mlir b/mlir/test/Pass/crash-recovery-dynamic-failure.mlir
index 69e087d5aa83a..cea4f6a79963b 100644
--- a/mlir/test/Pass/crash-recovery-dynamic-failure.mlir
+++ b/mlir/test/Pass/crash-recovery-dynamic-failure.mlir
@@ -1,10 +1,10 @@
+// The crash recovery mechanism will leak memory allocated in the crashing thread.
+// RUN: export LSAN_OPTIONS=detect_leaks=0
+
 // Check that local reproducers will also traverse dynamic pass pipelines.
 // RUN: mlir-opt %s -pass-pipeline='builtin.module(test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-failure})' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer --mlir-disable-threading
 // RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC_FAILURE %s
 
-// The crash recovery mechanism will leak memory allocated in the crashing thread.
-// UNSUPPORTED: asan
-
 module @inner_mod1 {
   // expected-error at below {{Failures have been detected while processing an MLIR pass pipeline}}
   // expected-note at below {{Pipeline failed while executing}}

diff  --git a/mlir/test/Pass/crash-recovery.mlir b/mlir/test/Pass/crash-recovery.mlir
index e636064d26e34..e5843d6207c67 100644
--- a/mlir/test/Pass/crash-recovery.mlir
+++ b/mlir/test/Pass/crash-recovery.mlir
@@ -1,3 +1,5 @@
+// The crash recovery mechanism will leak memory allocated in the crashing thread.
+// RUN: export LSAN_OPTIONS=detect_leaks=0
 // RUN: mlir-opt %s -pass-pipeline='builtin.module(builtin.module(test-module-pass, test-pass-crash))' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics
 // RUN: cat %t | FileCheck -check-prefix=REPRO %s
 // RUN: mlir-opt %s -pass-pipeline='builtin.module(builtin.module(test-module-pass, test-pass-crash))' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer -mlir-disable-threading

diff  --git a/mlir/test/mlir-cpu-runner/async-group.mlir b/mlir/test/mlir-cpu-runner/async-group.mlir
index 6407c324365ae..9735a5d330ee5 100644
--- a/mlir/test/mlir-cpu-runner/async-group.mlir
+++ b/mlir/test/mlir-cpu-runner/async-group.mlir
@@ -1,3 +1,10 @@
+// This is crashing in CI "most of the time" on a AMD Rome CPU VM on GCP with:
+//    Tracer caught signal 11: addr=0x7a800028 pc=0x2e81ba sp=0x7efd2a7ffd50
+//    LeakSanitizer has encountered a fatal error.
+// This is hard to reproduce locally unfortunately. Disable it with ASAN/LSAN
+// to keep the bot green for now.
+// RUN: export LSAN_OPTIONS=detect_leaks=0
+
 // RUN:   mlir-opt %s -pass-pipeline="builtin.module(async-to-async-runtime,func.func(async-runtime-ref-counting,async-runtime-ref-counting-opt),convert-async-to-llvm,func.func(convert-arith-to-llvm),convert-func-to-llvm,reconcile-unrealized-casts)" \
 // RUN: | mlir-cpu-runner                                                      \
 // RUN:     -e main -entry-point-result=void -O0                               \
@@ -6,13 +13,6 @@
 // RUN:     -shared-libs=%mlir_async_runtime   \
 // RUN: | FileCheck %s
 
-// This is crashing in CI "most of the time" on a AMD Rome CPU VM on GCP with:
-//    Tracer caught signal 11: addr=0x7a800028 pc=0x2e81ba sp=0x7efd2a7ffd50
-//    LeakSanitizer has encountered a fatal error.
-// This is hard to reproduce locally unfortunately. Disable it with ASAN/LSAN
-// to keep the bot green for now.
-// UNSUPPORTED: asan
-
 // FIXME: https://github.com/llvm/llvm-project/issues/57231
 // UNSUPPORTED: hwasan
 // FIXME: Windows does not have aligned_alloc


        


More information about the Mlir-commits mailing list