brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · e5843d6 Raw
36 lines · plain
1// The crash recovery mechanism will leak memory allocated in the crashing thread.2// RUN: export LSAN_OPTIONS=detect_leaks=03// RUN: mlir-opt %s -pass-pipeline='builtin.module(builtin.module(test-module-pass, test-pass-crash))' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics4// RUN: cat %t | FileCheck -check-prefix=REPRO %s5// 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-threading6// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s7 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-threading10// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s11 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-threading14// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC %s15 16// The crash recovery mechanism will leak memory allocated in the crashing thread.17// UNSUPPORTED: asan18 19// expected-error@below {{Failures have been detected while processing an MLIR pass pipeline}}20// expected-note@below {{Pipeline failed while executing}}21module @inner_mod1 {22  module @foo {}23}24 25// REPRO: module @inner_mod126// REPRO: module @foo {27// REPRO: pipeline: "builtin.module(builtin.module(test-module-pass,test-pass-crash))"28 29// REPRO_LOCAL: module @inner_mod130// REPRO_LOCAL: module @foo {31// REPRO_LOCAL: pipeline: "builtin.module(builtin.module(test-pass-crash))"32 33// REPRO_LOCAL_DYNAMIC: module @inner_mod134// REPRO_LOCAL_DYNAMIC: module @foo {35// REPRO_LOCAL_DYNAMIC: pipeline: "builtin.module(builtin.module(test-pass-crash))"36