[Mlir-commits] [mlir] bac4529 - Fix/disable more MLIR tests exposing leaks in ASAN builds (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Oct 2 16:53:39 PDT 2021
Author: Mehdi Amini
Date: 2021-10-02T23:53:02Z
New Revision: bac4529b439715762f0ab717c382b331cf3286ad
URL: https://github.com/llvm/llvm-project/commit/bac4529b439715762f0ab717c382b331cf3286ad
DIFF: https://github.com/llvm/llvm-project/commit/bac4529b439715762f0ab717c382b331cf3286ad.diff
LOG: Fix/disable more MLIR tests exposing leaks in ASAN builds (NFC)
Added:
Modified:
mlir/test/Examples/standalone/lit.local.cfg
mlir/test/IR/invalid.mlir
mlir/test/IR/opaque_locations.mlir
mlir/test/Pass/crash-recovery.mlir
mlir/test/lib/IR/TestOpaqueLoc.cpp
Removed:
################################################################################
diff --git a/mlir/test/Examples/standalone/lit.local.cfg b/mlir/test/Examples/standalone/lit.local.cfg
index 2ec53bdbeee8..14950ece8535 100644
--- a/mlir/test/Examples/standalone/lit.local.cfg
+++ b/mlir/test/Examples/standalone/lit.local.cfg
@@ -1,3 +1,8 @@
+# Disable with sanitizers for now, this require some more setup apparently.
+for san in ['asan', 'msan', 'ubsan']:
+ if (san in config.available_features):
+ config.unsupported = True
+
config.substitutions.append(("%cmake", config.host_cmake))
config.substitutions.append(("%host_cxx", config.host_cxx))
config.substitutions.append(("%host_cc", config.host_cc))
diff --git a/mlir/test/IR/invalid.mlir b/mlir/test/IR/invalid.mlir
index 80b0fae523e2..bbb87b4b820f 100644
--- a/mlir/test/IR/invalid.mlir
+++ b/mlir/test/IR/invalid.mlir
@@ -1,5 +1,8 @@
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics
+// See http://llvm.org/pr52045
+// UNSUPPORTED: asan
+
// Check
diff erent error cases.
// -----
diff --git a/mlir/test/IR/opaque_locations.mlir b/mlir/test/IR/opaque_locations.mlir
index 8d1dde8056ac..54f378176079 100644
--- a/mlir/test/IR/opaque_locations.mlir
+++ b/mlir/test/IR/opaque_locations.mlir
@@ -1,11 +1,11 @@
-// RUN: mlir-opt -allow-unregistered-dialect %s -test-opaque-loc -mlir-print-debuginfo -mlir-print-local-scope | FileCheck %s
+// RUN: mlir-opt %s -test-opaque-loc -mlir-print-debuginfo -mlir-print-local-scope | FileCheck %s
// This test verifies that debug opaque locations can be printed.
#set0 = affine_set<(d0) : (1 == 0)>
-// CHECK: MyLocation: 0: 'foo' op
-// CHECK: nullptr: 'foo' op
-// CHECK: MyLocation: 0: 'foo' op
+// CHECK: MyLocation: 0: 'test.foo' op
+// CHECK: nullptr: 'test.foo' op
+// CHECK: MyLocation: 0: 'test.foo' op
// CHECK: MyLocation: 1: 'std.constant' op
// CHECK: nullptr: 'std.constant' op
// CHECK: MyLocation: 1: 'std.constant' op
@@ -15,7 +15,7 @@ func @inline_notation() -> i32 {
// CHECK: -> i32 loc("foo")
// CHECK: -> i32 loc("foo")
// CHECK: -> i32 loc(unknown)
- %1 = "foo"() : () -> i32 loc("foo")
+ %1 = "test.foo"() : () -> i32 loc("foo")
// CHECK: constant 4 : index loc(callsite("foo" at "mysource.cc":10:8))
// CHECK: constant 4 : index loc(callsite("foo" at "mysource.cc":10:8))
diff --git a/mlir/test/Pass/crash-recovery.mlir b/mlir/test/Pass/crash-recovery.mlir
index e7e0a772aa01..31db0fd92abb 100644
--- a/mlir/test/Pass/crash-recovery.mlir
+++ b/mlir/test/Pass/crash-recovery.mlir
@@ -11,6 +11,9 @@
// RUN: mlir-opt %s -pass-pipeline='test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-crash}' -pass-pipeline-crash-reproducer=%t -verify-diagnostics -pass-pipeline-local-reproducer --mlir-disable-threading
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC %s
+// The crash recovery mechanism will leak memory allocated in the crashing thread.
+// UNSUPPORTED: asan
+
// expected-error at below {{Failures have been detected while processing an MLIR pass pipeline}}
// expected-note at below {{Pipeline failed while executing}}
module @inner_mod1 {
diff --git a/mlir/test/lib/IR/TestOpaqueLoc.cpp b/mlir/test/lib/IR/TestOpaqueLoc.cpp
index 39f5cfbd7fed..35d31a04f9d7 100644
--- a/mlir/test/lib/IR/TestOpaqueLoc.cpp
+++ b/mlir/test/lib/IR/TestOpaqueLoc.cpp
@@ -37,7 +37,7 @@ struct TestOpaqueLoc
std::vector<std::unique_ptr<MyLocation>> myLocs;
int last_it = 0;
- getOperation().walk([&](Operation *op) {
+ getOperation().getBody()->walk([&](Operation *op) {
myLocs.push_back(std::make_unique<MyLocation>(last_it++));
Location loc = op->getLoc();
More information about the Mlir-commits
mailing list