| Issue |
173370
|
| Summary |
mlir-opt crashes in mlir::tosa::TargetEnvAttr::get
|
| Labels |
crash,
mlir:tosa
|
| Assignees |
|
| Reporter |
Emilyaxe
|
When running mlir-opt on the following IR, mlir-opt crashes.
version 2c02e4c7909a
test.mlir
```
func.func @asin_scalar(%x: f32) -> f32 {
%r = math.asin %x : f32
return %r : f32
}
```
commads:
mlir-opt -tosa-validate test.mlir
stacktrace
```
LLVM ERROR: can't create Attribute 'mlir::tosa::TargetEnvAttr' because storage uniquer isn't initialized: the dialect was likely not loaded, or the attribute wasn't added with addAttributes<...>() in the Dialect::initialize() method.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: ./bin/mlir-opt -tosa-validate test.mlir
#0 0x0000561b39b8d358 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./bin/mlir-opt+0x1e97358)
#1 0x0000561b39b8aa15 llvm::sys::RunSignalHandlers() (./bin/mlir-opt+0x1e94a15)
#2 0x0000561b39b8e396 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f8ce49fd420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f8ce405600b raise /build/glibc-B3wQXB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f8ce4035859 abort /build/glibc-B3wQXB/glibc-2.31/stdlib/abort.c:81:7
#6 0x0000561b39b73e18 llvm::report_fatal_error(llvm::Twine const&, bool) (./bin/mlir-opt+0x1e7de18)
#7 0x0000561b40609f3b (./bin/mlir-opt+0x8913f3b)
#8 0x0000561b404caca6 mlir::tosa::TargetEnvAttr::get(mlir::MLIRContext*, mlir::tosa::SpecificationVersion, mlir::tosa::Level, llvm::ArrayRef<mlir::tosa::Profile>, llvm::ArrayRef<mlir::tosa::Extension>) (./bin/mlir-opt+0x87d4ca6)
#9 0x0000561b406217b9 mlir::tosa::lookupTargetEnvOrDefault(mlir::Operation*) (./bin/mlir-opt+0x892b7b9)
#10 0x0000561b3e4e7c0d (anonymous namespace)::TosaValidation::runOnOperation() TosaValidation.cpp:0:0
#11 0x0000561b422477be mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./bin/mlir-opt+0xa5517be)
#12 0x0000561b42248617 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./bin/mlir-opt+0xa552617)
#13 0x0000561b4224f9ca mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (./bin/mlir-opt+0xa5599ca)
#14 0x0000561b4224f01f mlir::PassManager::run(mlir::Operation*) (./bin/mlir-opt+0xa55901f)
#15 0x0000561b39c31377 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#16 0x0000561b39c305a6 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, 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::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#17 0x0000561b42562855 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::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./bin/mlir-opt+0xa86c855)
#18 0x0000561b39c26166 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./bin/mlir-opt+0x1f30166)
#19 0x0000561b39c264a2 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./bin/mlir-opt+0x1f304a2)
#20 0x0000561b39c26805 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./bin/mlir-opt+0x1f30805)
#21 0x0000561b39b739b3 main (./bin/mlir-opt+0x1e7d9b3)
#22 0x00007f8ce4037083 __libc_start_main /build/glibc-B3wQXB/glibc-2.31/csu/../csu/libc-start.c:342:3
#23 0x0000561b39b734ee _start (./bin/mlir-opt+0x1e7d4ee)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs