| Issue |
64638
|
| Summary |
[mlir][memref] --promote-buffers-to-stack crashed with assertion failure "integer overflow in element count computation"
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
anonymousMCS
|
git version: c7b537bf0923df05254f9fa4722b298eb8f4790d
system: `Ubuntu 20.04.6 LTS (Focal Fossa)`
reproduced with: `mlir-opt --promote-buffers-to-stack a.mlir`
a.mlir:
```
func.func @func1() {
%alloc_36 = memref.alloc() : memref<3090540x3090540x3090540xi32>
return
}
```
trace:
```
mlir-opt: /data/bin/llvm-project/mlir/lib/IR/BuiltinTypeInterfaces.cpp:32: static int64_t mlir::ShapedType::getNumElements(llvm::ArrayRef<long int>): Assertion `num >= 0 && "integer overflow in element count computation"' 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/bin/llvm-project/build/bin/mlir-opt --promote-buffers-to-stack reduced.mlir
#0 0x000055eeaae53a2f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/bin/llvm-project/build/bin/mlir-opt+0x14a8a2f)
#1 0x000055eeaae50cb4 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f55d940d420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007f55d8ef800b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007f55d8ed7859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x00007f55d8ed7729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#6 0x00007f55d8ee8fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#7 0x000055eead8ace71 (/data/bin/llvm-project/build/bin/mlir-opt+0x3f01e71)
#8 0x000055eeab2cd5fb defaultIsSmallAlloc(mlir::Value, unsigned int, unsigned int) BufferOptimizations.cpp:0:0
#9 0x000055eeab2c8368 (anonymous namespace)::PromoteBuffersToStackPass::runOnOperation() BufferOptimizations.cpp:0:0
#10 0x000055eead71801e mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6d01e)
#11 0x000055eead7184fa mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6d4fa)
#12 0x000055eead718edc mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
#13 0x000055eead717655 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6c655)
#14 0x000055eead717dba mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6cdba)
#15 0x000055eead7184fa mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6d4fa)
#16 0x000055eead718d01 mlir::PassManager::run(mlir::Operation*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d6dd01)
#17 0x000055eead7091ab performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#18 0x000055eead70a664 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
#19 0x000055eead70a814 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
#20 0x000055eead7fe404 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) (/data/bin/llvm-project/build/bin/mlir-opt+0x3e53404)
#21 0x000055eead703c37 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d58c37)
#22 0x000055eead70ab3b mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/bin/llvm-project/build/bin/mlir-opt+0x3d5fb3b)
#23 0x000055eeaad8df2b main (/data/bin/llvm-project/build/bin/mlir-opt+0x13e2f2b)
#24 0x00007f55d8ed9083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#25 0x000055eeaae2541e _start (/data/bin/llvm-project/build/bin/mlir-opt+0x147a41e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs