Skip to content

[mlir] mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::visitOperation crashes with segmentation fault #60215

Closed
@Colloportus0

Description

@Colloportus0

MLIR built at commit a0dab4950
Reproduced with:

mlir-opt --test-written-to temp.mlir

temp.mlir:

llvm.func @func1(i64)

llvm.func @func(%lb : i64, %ub : i64, %step : i64) -> () {
  omp.wsloop schedule(dynamic) ordered(0)
  for (%iv) : i64 = (%lb) to (%ub) step (%step) { 
    llvm.call @func1(%iv) : (i64) -> ()
    omp.yield
  }
  llvm.return
} 

trace:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: mlir-opt --test-written-to temp.mlir
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  mlir-opt                 0x00000001041c46b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  mlir-opt                 0x00000001041c3720 llvm::sys::RunSignalHandlers() + 112
2  mlir-opt                 0x00000001041c4d50 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x00000001aad414c4 _sigtramp + 56
4  mlir-opt                 0x0000000105837118 mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::visitOperation(mlir::Operation*) + 1196
5  mlir-opt                 0x0000000105836b70 mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) + 36
6  mlir-opt                 0x0000000105836c04 mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) + 184
7  mlir-opt                 0x0000000105836c04 mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) + 184
8  mlir-opt                 0x0000000105836c04 mlir::dataflow::AbstractSparseBackwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) + 184
9  mlir-opt                 0x000000010581fc14 mlir::DataFlowSolver::initializeAndRun(mlir::Operation*) + 352
10 mlir-opt                 0x00000001055afc84 (anonymous namespace)::TestWrittenToPass::runOnOperation() + 368
11 mlir-opt                 0x0000000105840428 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 428
12 mlir-opt                 0x0000000105840958 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
13 mlir-opt                 0x00000001058422d4 mlir::PassManager::run(mlir::Operation*) + 1148
14 mlir-opt                 0x000000010583b698 performActions(llvm::raw_ostream&, bool, bool, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, bool, bool) + 504
15 mlir-opt                 0x000000010583b268 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) + 704
16 mlir-opt                 0x00000001058a5f5c mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) + 656
17 mlir-opt                 0x0000000105839690 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool) + 216
18 mlir-opt                 0x0000000105839b84 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) + 1208
19 mlir-opt                 0x0000000104066ae4 main + 108
20 dyld                     0x0000000109019088 start + 516

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]mlir

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions