Issue |
128321
|
Summary |
[MLIR]`-test-bytecode-roundtrip=test-dialect-version=2.0` triggers Assertion Failure `succeeded(versionOr) && "expected reader to be able to access " "the version for test dialect"'
|
Labels |
mlir
|
Assignees |
|
Reporter |
xisang0
|
Test on commit: https://github.com/llvm/llvm-project/commit/a9882bda96228ca23e166a817f93a7dbc99763cb
steps to reproduce:
```
mlir-opt test.mlir -test-bytecode-roundtrip=test-dialect-version=2.0
```
test case:
```
module {
func.func @main() -> () {
return
}
}
```
crash trace:
```
mlir-opt: /home/workdir/llvm-project-19/mlir/test/lib/IR/TestBytecodeRoundtrip.cpp:170: auto (anonymous namespace)::TestBytecodeRoundtripPass::runTest0(Operation *)::(anonymous class)::operator()(DialectBytecodeReader &, StringRef, Type &) const: Assertion `succeeded(versionOr) && "expected reader to be able to access " "the version for test dialect"' 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 -test-bytecode-roundtrip=test-dialect-version=2.0
#0 0x000063e93b4fa998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x108a998)
#1 0x000063e93b4f84be llvm::sys::RunSignalHandlers() (./mlir-opt+0x10884be)
#2 0x000063e93b4fb3a8 SignalHandler(int) Signals.cpp:0:0
#3 0x0000765ce93c9520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x0000765ce941d9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x0000765ce93c9476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x0000765ce93af7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x0000765ce93af71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x0000765ce93c0e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x000063e93e69a424 (./mlir-opt+0x422a424)
#10 0x000063e9408a2b41 (anonymous namespace)::AttrTypeReader::resolveType(unsigned long) BytecodeReader.cpp:0:0
#11 0x000063e9408a1817 (anonymous namespace)::DialectReader::readType(mlir::Type&) BytecodeReader.cpp:0:0
#12 0x000063e93e8ee5ef (anonymous namespace)::BuiltinDialectBytecodeInterface::readAttribute(mlir::DialectBytecodeReader&) const BuiltinDialectBytecode.cpp:0:0
#13 0x000063e9408a23e4 (anonymous namespace)::AttrTypeReader::resolveAttribute(unsigned long) BytecodeReader.cpp:0:0
#14 0x000063e9408a1777 (anonymous namespace)::DialectReader::readAttribute(mlir::Attribute&) BytecodeReader.cpp:0:0
#15 0x000063e93b990911 llvm::LogicalResult mlir::DialectBytecodeReader::readAttribute<mlir::TypeAttr>(mlir::TypeAttr&) (./mlir-opt+0x1520911)
#16 0x000063e93bb8d517 mlir::func::FuncOp::readProperties(mlir::DialectBytecodeReader&, mlir::OperationState&) (./mlir-opt+0x171d517)
#17 0x000063e94089f0c8 mlir::BytecodeReader::Impl::parseRegions(std::vector<mlir::BytecodeReader::Impl::RegionReadState, std::allocator<mlir::BytecodeReader::Impl::RegionReadState>>&, mlir::BytecodeReader::Impl::RegionReadState&) (./mlir-opt+0x642f0c8)
#18 0x000063e94089aadb mlir::BytecodeReader::Impl::parseIRSection(llvm::ArrayRef<unsigned char>, mlir::Block*) (./mlir-opt+0x642aadb)
#19 0x000063e940897f3d mlir::BytecodeReader::Impl::read(mlir::Block*, llvm::function_ref<bool (mlir::Operation*)>) (./mlir-opt+0x6427f3d)
#20 0x000063e9408a08be readBytecodeFileImpl(llvm::MemoryBufferRef, mlir::Block*, mlir::ParserConfig const&, std::shared_ptr<llvm::SourceMgr> const&) BytecodeReader.cpp:0:0
#21 0x000063e9408a074e mlir::readBytecodeFile(llvm::MemoryBufferRef, mlir::Block*, mlir::ParserConfig const&) (./mlir-opt+0x643074e)
#22 0x000063e93e7c82ef mlir::parseSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (./mlir-opt+0x43582ef)
#23 0x000063e93e7c8988 mlir::parseSourceString(llvm::StringRef, mlir::Block*, mlir::ParserConfig const&, llvm::StringRef, mlir::LocationAttr*) (./mlir-opt+0x4358988)
#24 0x000063e93e699e74 (anonymous namespace)::TestBytecodeRoundtripPass::doRoundtripWithConfigs(mlir::Operation*, mlir::BytecodeWriterConfig const&, mlir::ParserConfig const&) TestBytecodeRoundtrip.cpp:0:0
#25 0x000063e93e697a00 (anonymous namespace)::TestBytecodeRoundtripPass::runOnOperation() TestBytecodeRoundtrip.cpp:0:0
#26 0x000063e93e7cb3bf mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x435b3bf)
#27 0x000063e93e7cbba2 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x435bba2)
#28 0x000063e93e7ce34e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x435e34e)
#29 0x000063e93e7c6e6b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#30 0x000063e93e7c6acb 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
#31 0x000063e93e86fdf5 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+0x43ffdf5)
#32 0x000063e93e7c19b2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x43519b2)
#33 0x000063e93e7c1c63 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4351c63)
#34 0x000063e93e7c1e72 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4351e72)
#35 0x000063e93b4d9c27 main (./mlir-opt+0x1069c27)
#36 0x0000765ce93b0d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#37 0x0000765ce93b0e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#38 0x000063e93b4d9795 _start (./mlir-opt+0x1069795)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs