Skip to content

Segfault in mlir-translate --mlir-to-llvmir with LLVM 16 #63832

Closed
@azteca1998

Description

@azteca1998

LLVM version

LLVM 16.0.6 in both Linux and Mac OS.

MLIR input

module attributes {llvm.data_layout = ""} {
  llvm.func @"hello_starknet::hello_starknet::main"(%arg0: i64, %arg1: !llvm.ptr) -> !llvm.struct<(i64, ptr, struct<()>)> attributes {llvm.emit_c_interface, sym_visibility = "public"} {
    %0 = llvm.mlir.constant(true) : i1
    %1 = llvm.mlir.constant(false) : i1
    %2 = llvm.mlir.constant(0 : i64) : i64
    %3 = llvm.mlir.constant(1 : i64) : i64
    %4 = llvm.alloca %3 x !llvm.struct<packed (i1, array<39 x i8>)> {alignment = 8 : i64} : (i64) -> !llvm.ptr<struct<packed (i1, array<39 x i8>)>>
    %5 = llvm.alloca %3 x i64 {alignment = 8 : i64} : (i64) -> !llvm.ptr<i64>
    %6 = llvm.alloca %3 x !llvm.struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)> {alignment = 8 : i64} : (i64) -> !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)>>
    %7 = llvm.alloca %3 x !llvm.struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)> {alignment = 8 : i64} : (i64) -> !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)>>
    %8 = llvm.getelementptr %arg1[0] : (!llvm.ptr) -> !llvm.ptr<ptr>
    %9 = llvm.load %8 : !llvm.ptr<ptr>
    llvm.store %arg0, %5 : !llvm.ptr<i64>
    %10 = llvm.getelementptr %arg1[1] : (!llvm.ptr) -> !llvm.ptr<func<void (ptr<struct<packed (i1, array<39 x i8>)>>, ptr, ptr<i64>, i64)>>
    llvm.call %10(%4, %9, %5, %2) : (!llvm.ptr<struct<packed (i1, array<39 x i8>)>>, !llvm.ptr, !llvm.ptr<i64>, i64) -> ()
    %11 = llvm.load %4 : !llvm.ptr<struct<packed (i1, array<39 x i8>)>>
    %12 = llvm.extractvalue %11[0] : !llvm.struct<packed (i1, array<39 x i8>)> 
    %13 = llvm.getelementptr %4[8] : (!llvm.ptr<struct<packed (i1, array<39 x i8>)>>) -> !llvm.ptr<i252>
    %14 = llvm.load %13 : !llvm.ptr<i252>
    %15 = llvm.getelementptr %4[8] : (!llvm.ptr<struct<packed (i1, array<39 x i8>)>>) -> !llvm.ptr<struct<(ptr<i252>, i32, i32)>>
    %16 = llvm.load %15 : !llvm.ptr<struct<(ptr<i252>, i32, i32)>>
    %17 = llvm.load %5 : !llvm.ptr<i64>
    llvm.cond_br %12, ^bb1(%14 : i252), ^bb2(%16 : !llvm.struct<(ptr<i252>, i32, i32)>)
  ^bb1(%18: i252):  // pred: ^bb0
    %19 = llvm.mlir.undef : !llvm.struct<packed (i1, array<7 x i8>, i252)>
    %20 = llvm.insertvalue %1, %19[0] : !llvm.struct<packed (i1, array<7 x i8>, i252)> 
    %21 = llvm.insertvalue %18, %20[2] : !llvm.struct<packed (i1, array<7 x i8>, i252)> 
    %22 = llvm.bitcast %7 : !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)>> to !llvm.ptr<struct<packed (i1, array<7 x i8>, i252)>>
    llvm.store %21, %22 {alignment = 8 : i64} : !llvm.ptr<struct<packed (i1, array<7 x i8>, i252)>>
    llvm.br ^bb3(%17, %arg1 : i64, !llvm.ptr)
  ^bb2(%23: !llvm.struct<(ptr<i252>, i32, i32)>):  // pred: ^bb0
    %24 = llvm.mlir.undef : !llvm.struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>)>
    %25 = llvm.insertvalue %0, %24[0] : !llvm.struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>)> 
    %26 = llvm.insertvalue %23, %25[2] : !llvm.struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>)> 
    %27 = llvm.bitcast %6 : !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>, array<16 x i8>)>> to !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>)>>
    llvm.store %26, %27 {alignment = 8 : i64} : !llvm.ptr<struct<packed (i1, array<7 x i8>, struct<(ptr<i252>, i32, i32)>)>>
    llvm.br ^bb3(%17, %arg1 : i64, !llvm.ptr)
  ^bb3(%28: i64, %29: !llvm.ptr):  // 2 preds: ^bb1, ^bb2
    %30 = llvm.mlir.undef : !llvm.struct<()>
    %31 = llvm.mlir.undef : !llvm.struct<(i64, ptr, struct<()>)>
    %32 = llvm.insertvalue %28, %31[0] : !llvm.struct<(i64, ptr, struct<()>)> 
    %33 = llvm.insertvalue %29, %32[1] : !llvm.struct<(i64, ptr, struct<()>)> 
    %34 = llvm.insertvalue %30, %33[2] : !llvm.struct<(i64, ptr, struct<()>)> 
    llvm.return %34 : !llvm.struct<(i64, ptr, struct<()>)>
  }
  llvm.func @"_mlir_ciface_hello_starknet::hello_starknet::main"(%arg0: !llvm.ptr<struct<(i64, ptr, struct<()>)>>, %arg1: i64, %arg2: !llvm.ptr) attributes {llvm.emit_c_interface, sym_visibility = "public"} {
    %0 = llvm.call @"hello_starknet::hello_starknet::main"(%arg1, %arg2) : (i64, !llvm.ptr) -> !llvm.struct<(i64, ptr, struct<()>)>
    llvm.store %0, %arg0 : !llvm.ptr<struct<(i64, ptr, struct<()>)>>
    llvm.return
  }
}

Stack trace after crashing

Stack trace in Linux (LLVM debug info available)

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: mlir-translate --mlir-to-llvmir
 #0 0x000055e5468be14b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /opt/llvm/llvm-project-16.0.6.src/llvm/lib/Support/Unix/Signals.inc:567:13
 #1 0x000055e5468bc450 llvm::sys::RunSignalHandlers() /opt/llvm/llvm-project-16.0.6.src/llvm/lib/Support/Signals.cpp:105:18
 #2 0x000055e5468beb0d SignalHandler(int) /opt/llvm/llvm-project-16.0.6.src/llvm/lib/Support/Unix/Signals.inc:0:3
 #3 0x00007f173484fab0 (/usr/lib/libc.so.6+0x39ab0)
 #4 0x000055e546d43d85 mlir::TypeStorage::getAbstractType() /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/IR/TypeSupport.h:130:13
 #5 0x000055e546d43d85 mlir::Type::getTypeID() /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/IR/Types.h:115:37
 #6 0x000055e546d43d85 bool mlir::detail::StorageUserBase<mlir::LLVM::LLVMVoidType, mlir::Type, mlir::TypeStorage, mlir::detail::TypeUniquer>::classof<mlir::Type>(mlir::Type) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/IR/StorageUniquerSupport.h:112:16
 #7 0x000055e546deeccb llvm::TypeSwitch<mlir::Type, llvm::Type*>& llvm::TypeSwitch<mlir::Type, llvm::Type*>::Case<mlir::LLVM::LLVMVoidType, mlir::LLVM::detail::TypeToLLVMIRTranslatorImpl::translateType(mlir::Type)::'lambda'(mlir::LLVM::LLVMVoidType)>(mlir::LLVM::detail::TypeToLLVMIRTranslatorImpl::translateType(mlir::Type)::'lambda'(mlir::LLVM::LLVMVoidType)&&) /opt/llvm/llvm-project-16.0.6.src/llvm/include/llvm/ADT/TypeSwitch.h:121:14
 #8 0x000055e546deeccb llvm::TypeSwitch<mlir::Type, llvm::Type*>& llvm::detail::TypeSwitchBase<llvm::TypeSwitch<mlir::Type, llvm::Type*>, mlir::Type>::Case<mlir::LLVM::detail::TypeToLLVMIRTranslatorImpl::translateType(mlir::Type)::'lambda'(mlir::LLVM::LLVMVoidType)>(mlir::LLVM::detail::TypeToLLVMIRTranslatorImpl::translateType(mlir::Type)::'lambda'(mlir::LLVM::LLVMVoidType)&&) /opt/llvm/llvm-project-16.0.6.src/llvm/include/llvm/ADT/TypeSwitch.h:60:29
 #9 0x000055e546deeccb mlir::LLVM::detail::TypeToLLVMIRTranslatorImpl::translateType(mlir::Type) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/TypeToLLVM.cpp:39:14
#10 0x000055e546e21c20 convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) /opt/llvm/llvm-project-16.0.6.src/build/tools/mlir/include/mlir/Dialect/LLVMIR/LLVMConversions.inc:144:49
#11 0x000055e546cb7287 mlir::LogicalResult::failed() const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:44:33
#12 0x000055e546cb7287 mlir::failed(mlir::LogicalResult) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:72:58
#13 0x000055e546cb7287 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:567:7
#14 0x000055e546cb7ac2 mlir::LogicalResult::failed() const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:44:33
#15 0x000055e546cb7ac2 mlir::failed(mlir::LogicalResult) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:72:58
#16 0x000055e546cb7ac2 mlir::LLVM::ModuleTranslation::convertBlock(mlir::Block&, bool, llvm::IRBuilderBase&) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:613:9
#17 0x000055e546cb900c mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:858:16
#18 0x000055e546cba606 mlir::LogicalResult::failed() const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:44:33
#19 0x000055e546cba606 mlir::failed(mlir::LogicalResult) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:72:58
#20 0x000055e546cba606 mlir::LLVM::ModuleTranslation::convertFunctions() /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1082:9
#21 0x000055e546cbc522 mlir::LogicalResult::failed() const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:44:33
#22 0x000055e546cbc522 mlir::failed(mlir::LogicalResult) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:72:58
#23 0x000055e546cbc522 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1417:7
#24 0x000055e546cb48c6 std::__uniq_ptr_impl<llvm::Module, std::default_delete<llvm::Module>>::_M_ptr() const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/unique_ptr.h:199:51
#25 0x000055e546cb48c6 std::unique_ptr<llvm::Module, std::default_delete<llvm::Module>>::get() const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/unique_ptr.h:470:21
#26 0x000055e546cb48c6 std::unique_ptr<llvm::Module, std::default_delete<llvm::Module>>::operator bool() const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/unique_ptr.h:487:16
#27 0x000055e546cb48c6 mlir::registerToLLVMIRTranslation()::$_0::operator()(mlir::Operation*, llvm::raw_ostream&) const /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp:31:14
#28 0x000055e546cb48c6 mlir::LogicalResult std::__invoke_impl<mlir::LogicalResult, mlir::registerToLLVMIRTranslation()::$_0&, mlir::Operation*, llvm::raw_ostream&>(std::__invoke_other, mlir::registerToLLVMIRTranslation()::$_0&, mlir::Operation*&&, llvm::raw_ostream&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/invoke.h:61:14
#29 0x000055e546cb48c6 std::enable_if<is_invocable_r_v<mlir::LogicalResult, mlir::registerToLLVMIRTranslation()::$_0&, mlir::Operation*, llvm::raw_ostream&>, mlir::LogicalResult>::type std::__invoke_r<mlir::LogicalResult, mlir::registerToLLVMIRTranslation()::$_0&, mlir::Operation*, llvm::raw_ostream&>(mlir::registerToLLVMIRTranslation()::$_0&, mlir::Operation*&&, llvm::raw_ostream&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/invoke.h:114:9
#30 0x000055e546cb48c6 std::_Function_handler<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&), mlir::registerToLLVMIRTranslation()::$_0>::_M_invoke(std::_Any_data const&, mlir::Operation*&&, llvm::raw_ostream&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/std_function.h:290:9
#31 0x000055e546fec6e8 std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)>::operator()(mlir::Operation*, llvm::raw_ostream&) const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/std_function.h:591:9
#32 0x000055e546fec6e8 mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3::operator()(std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*) const /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Tools/mlir-translate/Translation.cpp:153:16
#33 0x000055e546fec6e8 mlir::LogicalResult std::__invoke_impl<mlir::LogicalResult, mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*>(std::__invoke_other, mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/invoke.h:61:14
#34 0x000055e546fec6e8 std::enable_if<is_invocable_r_v<mlir::LogicalResult, mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*>, mlir::LogicalResult>::type std::__invoke_r<mlir::LogicalResult, mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*>(mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/invoke.h:114:9
#35 0x000055e546fec6e8 std::_Function_handler<mlir::LogicalResult (std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*), mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_3>::_M_invoke(std::_Any_data const&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/std_function.h:290:9
#36 0x000055e546feb21b std::function<mlir::LogicalResult (std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*)>::operator()(std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*) const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/std_function.h:591:9
#37 0x000055e546feb21b mlir::Translation::operator()(std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*) const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Tools/mlir-translate/Translation.h:81:12
#38 0x000055e546feb21b mlir::mlirTranslateMain(int, char**, llvm::StringRef)::$_0::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:95:14
#39 0x000055e546feb21b mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::mlirTranslateMain(int, char**, llvm::StringRef)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /opt/llvm/llvm-project-16.0.6.src/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#40 0x000055e546ff0ca5 llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /opt/llvm/llvm-project-16.0.6.src/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#41 0x000055e546ff0ca5 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) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Support/ToolUtilities.cpp:28:12
#42 0x000055e546fe9bc2 mlir::mlirTranslateMain(int, char**, llvm::StringRef) /opt/llvm/llvm-project-16.0.6.src/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:106:14
#43 0x000055e54689dad6 mlir::LogicalResult::failed() const /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:44:33
#44 0x000055e54689dad6 mlir::failed(mlir::LogicalResult) /opt/llvm/llvm-project-16.0.6.src/mlir/include/mlir/Support/LogicalResult.h:72:58
#45 0x000055e54689dad6 main /opt/llvm/llvm-project-16.0.6.src/mlir/tools/mlir-translate/mlir-translate.cpp:34:10
#46 0x00007f1734839850 (/usr/lib/libc.so.6+0x23850)
#47 0x00007f173483990a __libc_start_main (/usr/lib/libc.so.6+0x2390a)
#48 0x000055e54689d9c5 _start (/opt/llvm/dist/bin/mlir-translate+0x3819c5)
Segmentation fault (core dumped)

Stack trace in Mac OS (no LLVM debug info available)

PLEASE submit a bug report to https://github.com/Homebrew/homebrew-core/issues and include the crash backtrace.
Stack dump:
0.      Program arguments: mlir-translate --mlir-to-llvmir
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.dylib            0x000000010df943cc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  libLLVM.dylib            0x0000000111dc8850 SignalHandler(int) + 304
2  libsystem_platform.dylib 0x00000001826d6a24 _sigtramp + 56
3  mlir-translate           0x0000000104e748dc convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) + 18804
4  mlir-translate           0x0000000104e748dc convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) + 18804
5  mlir-translate           0x0000000104eaa4a4 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&) + 84
6  mlir-translate           0x0000000104eaa98c mlir::LLVM::ModuleTranslation::convertBlock(mlir::Block&, bool, llvm::IRBuilderBase&) + 448
7  mlir-translate           0x0000000104eb34b8 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef) + 31388
8  mlir-translate           0x0000000104eb824c std::__1::__function::__func<mlir::registerToLLVMIRTranslation()::$_0, std::__1::allocator<mlir::registerToLLVMIRTranslation()::$_0>, mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)>::operator()(mlir::Operation*&&, llvm::raw_ostream&) + 60
9  mlir-translate           0x0000000104f7416c std::__1::__function::__func<mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::__1::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::__1::function<void (mlir::DialectRegistry&)> const&)::$_0, std::__1::allocator<mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::__1::function<mlir::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::__1::function<void (mlir::DialectRegistry&)> const&)::$_0>, mlir::LogicalResult (std::__1::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*)>::operator()(std::__1::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) + 2000
10 mlir-translate           0x0000000104f716a8 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::mlirTranslateMain(int, char**, llvm::StringRef)::$_0>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) + 452
11 mlir-translate           0x0000000104f774fc mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) + 648
12 mlir-translate           0x0000000104f70164 mlir::mlirTranslateMain(int, char**, llvm::StringRef) + 720
13 mlir-translate           0x00000001047a0eb4 main + 68
14 dyld                     0x000000018234ff28 start + 2236
Segmentation fault: 11

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions