1 // The crash recovery mechanism will leak memory allocated in the crashing thread.
2 // RUN: export LSAN_OPTIONS=detect_leaks=0
3 // RUN: mlir-opt %s -pass-pipeline='builtin.module(builtin.module(test-module-pass, test-pass-crash))' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics
4 // RUN: cat %t | FileCheck -check-prefix=REPRO %s
5 // 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
6 // RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s
8 // Check that we correctly handle verifiers passes with local reproducer, this used to crash.
9 // RUN: mlir-opt %s -test-module-pass -test-module-pass -test-module-pass -mlir-pass-pipeline-crash-reproducer=%t -mlir-pass-pipeline-local-reproducer -mlir-disable-threading
10 // RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s
12 // Check that local reproducers will also traverse dynamic pass pipelines.
13 // 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-crash})' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer --mlir-disable-threading
14 // RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC %s
16 // The crash recovery mechanism will leak memory allocated in the crashing thread.
19 // expected-error@below {{Failures have been detected while processing an MLIR pass pipeline}}
20 // expected-note@below {{Pipeline failed while executing}}
25 // REPRO: module @inner_mod1
26 // REPRO: module @foo {
27 // REPRO: pipeline: "builtin.module(builtin.module(test-module-pass,test-pass-crash))"
29 // REPRO_LOCAL: module @inner_mod1
30 // REPRO_LOCAL: module @foo {
31 // REPRO_LOCAL: pipeline: "builtin.module(builtin.module(test-pass-crash))"
33 // REPRO_LOCAL_DYNAMIC: module @inner_mod1
34 // REPRO_LOCAL_DYNAMIC: module @foo {
35 // REPRO_LOCAL_DYNAMIC: pipeline: "builtin.module(builtin.module(test-pass-crash))"