Skip to content

Commit

Permalink
[LSAN] Disable leaks in test using environment variables instead of n…
Browse files Browse the repository at this point in the history
…ot running them with ASAN.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D145615
  • Loading branch information
kstoimenov committed Mar 8, 2023
1 parent 6822156 commit 50cd2c2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
5 changes: 3 additions & 2 deletions clang/test/CodeGenCXX/debug-info-enum-i128.cpp
Original file line number Diff line number Diff line change
@@ -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; }
Expand Down
6 changes: 3 additions & 3 deletions mlir/test/Pass/crash-recovery-dynamic-failure.mlir
Original file line number Diff line number Diff line change
@@ -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@below {{Failures have been detected while processing an MLIR pass pipeline}}
// expected-note@below {{Pipeline failed while executing}}
Expand Down
2 changes: 2 additions & 0 deletions mlir/test/Pass/crash-recovery.mlir
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 7 additions & 7 deletions mlir/test/mlir-cpu-runner/async-group.mlir
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 50cd2c2

Please sign in to comment.