Skip to content

Commit bac4529

Browse files
committed
Fix/disable more MLIR tests exposing leaks in ASAN builds (NFC)
1 parent 4b28638 commit bac4529

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

mlir/test/Examples/standalone/lit.local.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Disable with sanitizers for now, this require some more setup apparently.
2+
for san in ['asan', 'msan', 'ubsan']:
3+
if (san in config.available_features):
4+
config.unsupported = True
5+
16
config.substitutions.append(("%cmake", config.host_cmake))
27
config.substitutions.append(("%host_cxx", config.host_cxx))
38
config.substitutions.append(("%host_cc", config.host_cc))

mlir/test/IR/invalid.mlir

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics
22

3+
// See http://llvm.org/pr52045
4+
// UNSUPPORTED: asan
5+
36
// Check different error cases.
47
// -----
58

mlir/test/IR/opaque_locations.mlir

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// RUN: mlir-opt -allow-unregistered-dialect %s -test-opaque-loc -mlir-print-debuginfo -mlir-print-local-scope | FileCheck %s
1+
// RUN: mlir-opt %s -test-opaque-loc -mlir-print-debuginfo -mlir-print-local-scope | FileCheck %s
22
// This test verifies that debug opaque locations can be printed.
33

44
#set0 = affine_set<(d0) : (1 == 0)>
55

6-
// CHECK: MyLocation: 0: 'foo' op
7-
// CHECK: nullptr: 'foo' op
8-
// CHECK: MyLocation: 0: 'foo' op
6+
// CHECK: MyLocation: 0: 'test.foo' op
7+
// CHECK: nullptr: 'test.foo' op
8+
// CHECK: MyLocation: 0: 'test.foo' op
99
// CHECK: MyLocation: 1: 'std.constant' op
1010
// CHECK: nullptr: 'std.constant' op
1111
// CHECK: MyLocation: 1: 'std.constant' op
@@ -15,7 +15,7 @@ func @inline_notation() -> i32 {
1515
// CHECK: -> i32 loc("foo")
1616
// CHECK: -> i32 loc("foo")
1717
// CHECK: -> i32 loc(unknown)
18-
%1 = "foo"() : () -> i32 loc("foo")
18+
%1 = "test.foo"() : () -> i32 loc("foo")
1919

2020
// CHECK: constant 4 : index loc(callsite("foo" at "mysource.cc":10:8))
2121
// CHECK: constant 4 : index loc(callsite("foo" at "mysource.cc":10:8))

mlir/test/Pass/crash-recovery.mlir

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// 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
1212
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC %s
1313

14+
// The crash recovery mechanism will leak memory allocated in the crashing thread.
15+
// UNSUPPORTED: asan
16+
1417
// expected-error@below {{Failures have been detected while processing an MLIR pass pipeline}}
1518
// expected-note@below {{Pipeline failed while executing}}
1619
module @inner_mod1 {

mlir/test/lib/IR/TestOpaqueLoc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct TestOpaqueLoc
3737
std::vector<std::unique_ptr<MyLocation>> myLocs;
3838
int last_it = 0;
3939

40-
getOperation().walk([&](Operation *op) {
40+
getOperation().getBody()->walk([&](Operation *op) {
4141
myLocs.push_back(std::make_unique<MyLocation>(last_it++));
4242

4343
Location loc = op->getLoc();

0 commit comments

Comments
 (0)