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

Kirill Stoimenov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 14:06:14 PST 2023


kstoimenov created this revision.
Herald added subscribers: Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, thopre.
Herald added a project: All.
kstoimenov requested review of this revision.
Herald added subscribers: cfe-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, MLIR.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145615

Files:
  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


Index: mlir/test/mlir-cpu-runner/async-group.mlir
===================================================================
--- mlir/test/mlir-cpu-runner/async-group.mlir
+++ 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
Index: mlir/test/Pass/crash-recovery.mlir
===================================================================
--- mlir/test/Pass/crash-recovery.mlir
+++ 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
Index: mlir/test/Pass/crash-recovery-dynamic-failure.mlir
===================================================================
--- mlir/test/Pass/crash-recovery-dynamic-failure.mlir
+++ 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}}
Index: clang/test/CodeGenCXX/debug-info-enum-i128.cpp
===================================================================
--- clang/test/CodeGenCXX/debug-info-enum-i128.cpp
+++ 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; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145615.503512.patch
Type: text/x-patch
Size: 4321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230308/b734a67f/attachment.bin>


More information about the cfe-commits mailing list