+# 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))
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics
+// See http://llvm.org/pr52045
+// UNSUPPORTED: asan
+
// Check different error cases.
// -----
-// 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
// 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))
// 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 {
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();