Skip to content

[mlir] mlir-opt crashes without allow-unregistered-dialect #221143

Description

@Aran-414

git version: 7ece48b

MLIR Program:

%0 = "test"() : () -> f32

Reproduce Command: mlir-opt a.mlir

StackTrace:

LLVM ERROR: test created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR tool used.
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: mlir-opt a.mlir
 #0 0x0000559698c7bddf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x20bfddf)
 #1 0x0000559698c7894c llvm::sys::RunSignalHandlers() (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x20bc94c)
 #2 0x0000559698c78af3 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f3a7f346420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f3a7ee3100b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f3a7ee10859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x0000559698bd8705 (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x201c705)
 #7 0x00005596a2569579 mlir::Operation::Operation(mlir::Location, mlir::OperationName, unsigned int, unsigned int, unsigned int, int, mlir::DictionaryAttr, mlir::PropertyRef, bool) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb9ad579)
 #8 0x00005596a256ba76 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::PropertyRef, mlir::BlockRange, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb9afa76)
 #9 0x00005596a256c1ea mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::PropertyRef, mlir::BlockRange, mlir::RegionRange) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb9b01ea)
#10 0x00005596a256c5a8 mlir::Operation::create(mlir::OperationState const&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb9b05a8)
#11 0x00005596a24a6683 mlir::OpBuilder::create(mlir::OperationState const&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb8ea683)
#12 0x00005596a1e88b37 (anonymous namespace)::OperationParser::parseGenericOperation() Parser.cpp:0:0
#13 0x00005596a1e89510 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#14 0x00005596a1e8b028 mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb2cf028)
#15 0x00005596a04aa215 mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x98ee215)
#16 0x0000559698d411e6 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#17 0x0000559698d42cbf processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, mlir::SourceMgrDiagnosticVerifierHandler*, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#18 0x0000559698d42eeb 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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#19 0x00005596a25cc2b5 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) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xba102b5)
#20 0x0000559698d38f34 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (.part.0) MlirOptMain.cpp:0:0
#21 0x0000559698d43407 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x2187407)
#22 0x0000559698d43643 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x2187643)
#23 0x0000559698be2a97 main (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x2026a97)
#24 0x00007f3a7ee12083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#25 0x0000559698c5877e _start (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x209c77e)
Aborted (core dumped)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]mlir

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions