Issue |
128342
|
Summary |
[MLIR]`--mlir-debug-counter=pass-execution-skip=1 --test-pdll-pass` triggers Assertion failure `matcherFunc && rewriterModule && "invalid PDL Interpreter module"'
|
Labels |
mlir
|
Assignees |
|
Reporter |
xisang0
|
Test on commit: https://github.com/llvm/llvm-project/commit/1d070988d9172965dee227e5629fa886845b815f
steps to reproduce:
```
mlir-opt test.mlir --mlir-debug-counter=pass-execution-skip=1 --test-pdll-pass
```
test case:
```
module
{
}
```
crash trace:
```
mlir-opt: /home/workdir/llvm-project-19/mlir/lib/Rewrite/ByteCode.cpp:505: void (anonymous namespace)::Generator::generate(ModuleOp): Assertion `matcherFunc && rewriterModule && "invalid PDL Interpreter module"' failed.
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 /home/workdir/test.mlir --mlir-debug-counter=pass-execution-skip=1 --test-pdll-pass
#0 0x00006080039a02b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x10b62b8)
#1 0x000060800399ddde llvm::sys::RunSignalHandlers() (./mlir-opt+0x10b3dde)
#2 0x00006080039a0cc8 SignalHandler(int) Signals.cpp:0:0
#3 0x00007c80aed8f520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007c80aede39fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007c80aed8f476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007c80aed757f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007c80aed7571b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007c80aed86e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x0000608008e3c96c mlir::detail::PDLByteCode::PDLByteCode(mlir::ModuleOp, llvm::SmallVector<std::unique_ptr<mlir::PDLPatternConfigSet, std::default_delete<mlir::PDLPatternConfigSet>>, 6u>, llvm::DenseMap<mlir::Operation*, mlir::PDLPatternConfigSet*, llvm::DenseMapInfo<mlir::Operation*, void>, llvm::detail::DenseMapPair<mlir::Operation*, mlir::PDLPatternConfigSet*>> const&, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>) (./mlir-opt+0x655296c)
#10 0x0000608008e3422b std::_MakeUniq<mlir::detail::PDLByteCode>::__single_object std::make_unique<mlir::detail::PDLByteCode, mlir::ModuleOp&, llvm::SmallVector<std::unique_ptr<mlir::PDLPatternConfigSet, std::default_delete<mlir::PDLPatternConfigSet>>, 6u>, llvm::DenseMap<mlir::Operation*, mlir::PDLPatternConfigSet*, llvm::DenseMapInfo<mlir::Operation*, void>, llvm::detail::DenseMapPair<mlir::Operation*, mlir::PDLPatternConfigSet*>>&, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>>(mlir::ModuleOp&, llvm::SmallVector<std::unique_ptr<mlir::PDLPatternConfigSet, std::default_delete<mlir::PDLPatternConfigSet>>, 6u>&&, llvm::DenseMap<mlir::Operation*, mlir::PDLPatternConfigSet*, llvm::DenseMapInfo<mlir::Operation*, void>, llvm::detail::DenseMapPair<mlir::Operation*, mlir::PDLPatternConfigSet*>>&, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>&&, llvm::StringMap<std::function<llvm::LogicalResult (mlir::PatternRewriter&, mlir::PDLResultList&, llvm::ArrayRef<mlir::PDLValue>)>, llvm::MallocAllocator>&&) (./mlir-opt+0x654a22b)
#11 0x0000608008e3369a mlir::FrozenRewritePatternSet::FrozenRewritePatternSet(mlir::RewritePatternSet&&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>) (./mlir-opt+0x654969a)
#12 0x0000608006cc3645 (anonymous namespace)::TestPDLLPass::initialize(mlir::MLIRContext*) TestPDLL.cpp:0:0
#13 0x0000608006d9618c mlir::OpPassManager::initialize(mlir::MLIRContext*, unsigned int) (./mlir-opt+0x44ac18c)
#14 0x0000608006d9937d mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x44af37d)
#15 0x0000608006d920ab performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#16 0x0000608006d91d03 llvm::LogicalResult llvm::function_ref<llvm::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&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#17 0x0000608006e3b465 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::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./mlir-opt+0x4551465)
#18 0x0000608006d8b962 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x44a1962)
#19 0x0000608006d8bc13 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x44a1c13)
#20 0x0000608006d8be22 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x44a1e22)
#21 0x000060800397f4d7 main (./mlir-opt+0x10954d7)
#22 0x00007c80aed76d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#23 0x00007c80aed76e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#24 0x000060800397f045 _start (./mlir-opt+0x1095045)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs