Issue |
132894
|
Summary |
[mlir] Assertion 'Index < this->size() && "Invalid index!"' failed in array
|
Labels |
|
Assignees |
|
Reporter |
wwy6191
|
git version: 59fd2878fce470f02058f43d4b818ed68ce04094
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt a.mlir`
a.mlir:
```
module {
spirv.func @f(f32) "None" {
%c0 = arith.constant 0 : index
spirv.Return
}
}
```
stack trace:
```
mlir-opt: /data/szy/MLIR/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:446: T &llvm::MutableArrayRef<mlir::BlockArgument>::operator[](size_t) const [T = mlir::BlockArgument]: Assertion `Index < this->size() && "Invalid index!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-project/install/bin/mlir-opt /data/szy/MLIR/seed/seed6/tmp.hCB0D6FEej.mlir
#0 0x000056291acdcdb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bddb8)
#1 0x000056291acda8be llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bb8be)
#2 0x000056291acdd736 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007fdc2ce3c420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007fdc2c47900b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007fdc2c458859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007fdc2c458729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007fdc2c458729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007fdc2c469fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x0000562920f503a2 mlir::call_interface_impl::printFunctionSignature(mlir::OpAsmPrinter&, mlir::TypeRange, mlir::ArrayAttr, bool, mlir::TypeRange, mlir::ArrayAttr, mlir::Region*, bool) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x74313a2)
#10 0x000056291d1ad7f5 mlir::spirv::FuncOp::print(mlir::OpAsmPrinter&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x368e7f5)
#11 0x000056291cf2e66e mlir::Op<mlir::spirv::FuncOp, mlir::OpTrait::OneRegion, mlir::OpTrait::ZeroResults, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::ZeroOperands, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait, mlir::OpTrait::AutomaticAllocationScope, mlir::SymbolOpInterface::Trait, mlir::CallableOpInterface::Trait, mlir::FunctionOpInterface::Trait, mlir::OpTrait::IsIsolatedFromAbove, mlir::detail::Interface<mlir::spirv::QueryMinVersionInterface, mlir::Operation*, mlir::spirv::detail::QueryMinVersionInterfaceTraits, mlir::Op<mlir::spirv::QueryMinVersionInterface>, mlir::OpTrait::TraitBase>::Trait, mlir::detail::Interface<mlir::spirv::QueryMaxVersionInterface, mlir::Operation*, mlir::spirv::detail::QueryMaxVersionInterfaceTraits, mlir::Op<mlir::spirv::QueryMaxVersionInterface>, mlir::OpTrait::TraitBase>::Trait, mlir::detail::Interface<mlir::spirv::QueryExtensionInterface, mlir::Operation*, mlir::spirv::detail::QueryExtensionInterfaceTraits, mlir::Op<mlir::spirv::QueryExtensionInterface>, mlir::OpTrait::TraitBase>::Trait, mlir::detail::Interface<mlir::spirv::QueryCapabilityInterface, mlir::Operation*, mlir::spirv::detail::QueryCapabilityInterfaceTraits, mlir::Op<mlir::spirv::QueryCapabilityInterface>, mlir::OpTrait::TraitBase>::Trait>::getPrintAssemblyFn()::'lambda'(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef)::operator()(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef) const (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x340f66e)
#12 0x000056291cf2ac21 mlir::RegisteredOperationName::Model<mlir::spirv::FuncOp>::printAssembly(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x340bc21)
#13 0x000056291ddb13fd (anonymous namespace)::DummyAliasOperationPrinter::print(mlir::Block*, bool, bool) AsmPrinter.cpp:0:0
#14 0x000056291ddaed90 (anonymous namespace)::DummyAliasOperationPrinter::printRegion(mlir::Region&, bool, bool, bool) AsmPrinter.cpp:0:0
#15 0x000056291de03de0 mlir::ModuleOp::print(mlir::OpAsmPrinter&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e4de0)
#16 0x000056291de0771e mlir::Op<mlir::ModuleOp, mlir::OpTrait::OneRegion, mlir::OpTrait::ZeroResults, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::ZeroOperands, mlir::OpTrait::NoRegionArguments, mlir::OpTrait::NoTerminator, mlir::OpTrait::SingleBlock, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait, mlir::OpTrait::AffineScope, mlir::OpTrait::IsIsolatedFromAbove, mlir::OpTrait::SymbolTable, mlir::SymbolOpInterface::Trait, mlir::OpAsmOpInterface::Trait, mlir::RegionKindInterface::Trait, mlir::OpTrait::HasOnlyGraphRegion>::getPrintAssemblyFn()::'lambda'(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef)::operator()(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef) const (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e871e)
#17 0x000056291de04bd1 mlir::RegisteredOperationName::Model<mlir::ModuleOp>::printAssembly(mlir::Operation*, mlir::OpAsmPrinter&, llvm::StringRef) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e5bd1)
#18 0x000056291dda89ca mlir::detail::AsmStateImpl::initializeAliases(mlir::Operation*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42899ca)
#19 0x000056291dda76b6 mlir::Operation::print(llvm::raw_ostream&, mlir::AsmState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42886b6)
#20 0x000056291dce2c7a performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#21 0x000056291dce23ed 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
#22 0x000056291dd8d275 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) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x426e275)
#23 0x000056291dcdc405 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd405)
#24 0x000056291dcdc6af mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd6af)
#25 0x000056291dcdc9de mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd9de)
#26 0x000056291acbb337 main (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119c337)
#27 0x00007fdc2c45a083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#28 0x000056291acbae9e _start (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119be9e)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs