| Issue |
61527
|
| Summary |
[MLIR]`TestFuncEraseArg` triggers crash with Assertion Failure `!NodePtr->isKnownSentinel()'
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
BealZephyr
|
Test on commit: https://github.com/llvm/llvm-project/commit/333ae0a6c4d2209e3b8c6c672986a52644bd5baf
steps to reproduce:
```
mlir-opt -test-func-erase-arg test.mlir
```
test case:
```
module {
llvm.func @malloc(i64) -> !llvm.ptr<i8>
}
```
backtrace:
```
mlir-opt: /home/ty/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:138: llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::reference llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::operator*() const [with OptionsT = llvm::ilist_detail::node_options<mlir::Block, true, false, void>; bool IsReverse = false; bool IsConst = false; llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::reference = mlir::Block&]: Assertion `!NodePtr->isKnownSentinel()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/ty/llvm-project/build/bin/mlir-opt -test-func-erase-arg test.mlir
#0 0x000055a25c3ec4ea llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ty/llvm-project/build/bin/mlir-opt+0x2244ea)
#1 0x000055a25c3e977c SignalHandler(int) Signals.cpp:0:0
#2 0x00007f8927ed0980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f8926fc8e87 raise /build/glibc-CVJwZb/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f8926fca7f1 abort /build/glibc-CVJwZb/glibc-2.27/stdlib/abort.c:81:0
#5 0x00007f8926fba3fa __assert_fail_base /build/glibc-CVJwZb/glibc-2.27/assert/assert.c:89:0
#6 0x00007f8926fba472 (/lib/x86_64-linux-gnu/libc.so.6+0x30472)
#7 0x000055a25de28d3d mlir::function_interface_impl::eraseFunctionArguments(mlir::FunctionOpInterface, llvm::BitVector const&, mlir::Type) (/home/ty/llvm-project/build/bin/mlir-opt+0x1c60d3d)
#8 0x000055a25db957cc (anonymous namespace)::TestFuncEraseArg::runOnOperation() TestFunc.cpp:0:0
#9 0x000055a25dcb4fe9 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aecfe9)
#10 0x000055a25dcb5e43 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (.constprop.495) Pass.cpp:0:0
#11 0x000055a25dcb652d mlir::PassManager::run(mlir::Operation*) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aee52d)
#12 0x000055a25dca9453 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#13 0x000055a25dca9b89 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) MlirOptMain.cpp:0:0
#14 0x000055a25dca9eb1 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, 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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#15 0x000055a25dd74ce0 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1bacce0)
#16 0x000055a25dca6b93 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/ty/llvm-project/build/bin/mlir-opt+0x1adeb93)
#17 0x000055a25dcaa2a6 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1ae22a6)
#18 0x000055a25c3b8650 main (/home/ty/llvm-project/build/bin/mlir-opt+0x1f0650)
#19 0x00007f8926fabc87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#20 0x000055a25c3cb4aa _start (/home/ty/llvm-project/build/bin/mlir-opt+0x2034aa)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs