| Issue |
173561
|
| Summary |
mlir-opt crashes in mlir::Inliner::Impl::inlineSCC
|
| Labels |
mlir:core,
crash
|
| Assignees |
|
| Reporter |
Emilyaxe
|
When running opt on the following IR, mlir-opt crashes.
version 2c02e4c7909a
test.mlir
```
module {
llvm.func @gen_broadcast_scalar1d(%arg0: i32) -> i32 attributes {llvm.emit_c_interface} {
%0 = "test.broadcast_bounds_mismatch1"(%arg0) : (i32) -> i32
}
llvm.func @_mlir_ciface_gen_broadcast_scalar1d(%arg0: i32) -> i32 attributes {llvm.emit_c_interface} {
%0 = llvm.call @gen_broadcast_scalar1d(%arg0) : (i32) -> i32
llvm.return %0 : i32
}
}
```
commads:
mlir-opt -inline test.mlir
stacktrace
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: ./build/bin/mlir-opt -inline test.mlir
#0 0x000055f2732b4358 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./build/bin/mlir-opt+0x1e97358)
#1 0x000055f2732b1a15 llvm::sys::RunSignalHandlers() (./build/bin/mlir-opt+0x1e94a15)
#2 0x000055f2732b5396 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f78cb94e420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f78cafa700b raise /build/glibc-B3wQXB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f78caf86859 abort /build/glibc-B3wQXB/glibc-2.31/stdlib/abort.c:81:7
#6 0x000055f27329ae18 llvm::report_fatal_error(llvm::Twine const&, bool) (./build/bin/mlir-opt+0x1e7de18)
#7 0x000055f27329ac36 (./build/bin/mlir-opt+0x1e7dc36)
#8 0x000055f27bc4d01d mlir::Operation::~Operation() (./build/bin/mlir-opt+0xa83001d)
#9 0x000055f27bc55172 llvm::iplist_impl<llvm::simple_ilist<mlir::Operation>, llvm::ilist_traits<mlir::Operation>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, false, false>) (./build/bin/mlir-opt+0xa838172)
#10 0x000055f27b8f5b30 mlir::Inliner::Impl::inlineSCC((anonymous namespace)::InlinerInterfaceImpl&, (anonymous namespace)::CGUseList&, (anonymous namespace)::CallGraphSCC&, mlir::MLIRContext*) Inliner.cpp:0:0
#11 0x000055f27b8eee02 mlir::Inliner::doInlining() (./build/bin/mlir-opt+0xa4d1e02)
#12 0x000055f27b87bdaf (anonymous namespace)::InlinerPass::runOnOperation() InlinerPass.cpp:0:0
#13 0x000055f27b96e7be mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./build/bin/mlir-opt+0xa5517be)
#14 0x000055f27b96f617 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./build/bin/mlir-opt+0xa552617)
#15 0x000055f27b9769ca mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (./build/bin/mlir-opt+0xa5599ca)
#16 0x000055f27b97601f mlir::PassManager::run(mlir::Operation*) (./build/bin/mlir-opt+0xa55901f)
#17 0x000055f273358377 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#18 0x000055f2733575a6 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#19 0x000055f27bc89855 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./build/bin/mlir-opt+0xa86c855)
#20 0x000055f27334d166 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./build/bin/mlir-opt+0x1f30166)
#21 0x000055f27334d4a2 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./build/bin/mlir-opt+0x1f304a2)
#22 0x000055f27334d805 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./build/bin/mlir-opt+0x1f30805)
#23 0x000055f27329a9b3 main (./build/bin/mlir-opt+0x1e7d9b3)
#24 0x00007f78caf88083 __libc_start_main /build/glibc-B3wQXB/glibc-2.31/csu/../csu/libc-start.c:342:3
#25 0x000055f27329a4ee _start (./build/bin/mlir-opt+0x1e7d4ee)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs