Fix/disable more MLIR tests exposing leaks in ASAN builds (NFC)

This commit is contained in:
Mehdi Amini
2021-10-02 23:53:02 +00:00
parent 4b28638bcc
commit bac4529b43
5 changed files with 17 additions and 6 deletions

View File

@@ -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))

View File

@@ -1,5 +1,8 @@
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics
// See http://llvm.org/pr52045
// UNSUPPORTED: asan
// Check different error cases.
// -----

View File

@@ -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))

View File

@@ -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@below {{Failures have been detected while processing an MLIR pass pipeline}}
// expected-note@below {{Pipeline failed while executing}}
module @inner_mod1 {

View File

@@ -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();