Skip to content

[ICE]: Cranelift Unimplemented Relocation #1633

@nuudlman

Description

@nuudlman

Code

fn main {}

Compile with -Zcodegen-backend=cranelift -Ctarget-cpu=native on an M4 system.

Meta

rustc --version --verbose:

rustc 1.96.0-nightly (e370b60cf 2026-03-07)
binary: rustc
commit-hash: e370b60cf2b0d3e4b55923ec1558c5b5f8970cfb
commit-date: 2026-03-07
host: aarch64-apple-darwin
release: 1.96.0-nightly
LLVM version: 22.1.0

Error output

thread 'rustc' (1894541) panicked at /rustc-dev/e370b60cf2b0d3e4b55923ec1558c5b5f8970cfb/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs:89:14:
called `Result::unwrap()` on an `Err` value: Error("unimplemented relocation Relocation { offset: 32, symbol: SymbolId(11), addend: 0, flags: Generic { kind: Relative, encoding: Generic, size: 32 } }")
Backtrace

thread 'rustc' (1894912) panicked at /rustc-dev/e370b60cf2b0d3e4b55923ec1558c5b5f8970cfb/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs:89:14:
called `Result::unwrap()` on an `Err` value: Error("unimplemented relocation Relocation { offset: 32, symbol: SymbolId(11), addend: 0, flags: Generic { kind: Relative, encoding: Generic, size: 32 } }")
stack backtrace:
   0:        0x111ab0c28 - <<std[4363f048fae9c8af]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[f1dce288aaae9328]::fmt::Display>::fmt
   1:        0x10ec7ac28 - core[f1dce288aaae9328]::fmt::write
   2:        0x111ac8418 - <std[4363f048fae9c8af]::sys::stdio::unix::Stderr as std[4363f048fae9c8af]::io::Write>::write_fmt
   3:        0x111a872f4 - std[4363f048fae9c8af]::panicking::default_hook::{closure#0}
   4:        0x111aa3110 - std[4363f048fae9c8af]::panicking::default_hook
   5:        0x10f8eec90 - std[4363f048fae9c8af]::panicking::update_hook::<alloc[d0e3ae77f8b00750]::boxed::Box<rustc_driver_impl[7f7da6b576ab5781]::install_ice_hook::{closure#1}>>::{closure#0}
   6:        0x111aa3474 - std[4363f048fae9c8af]::panicking::panic_with_hook
   7:        0x111a8739c - std[4363f048fae9c8af]::panicking::panic_handler::{closure#0}
   8:        0x111a7dd40 - std[4363f048fae9c8af]::sys::backtrace::__rust_end_short_backtrace::<std[4363f048fae9c8af]::panicking::panic_handler::{closure#0}, !>
   9:        0x111a8896c - __rustc[530e92af27cdbe53]::rust_begin_unwind
  10:        0x114ac3b8c - core[f1dce288aaae9328]::panicking::panic_fmt
  11:        0x114ac38f4 - core[f1dce288aaae9328]::result::unwrap_failed
  12:        0x1090d8bd4 - <cranelift_object[be37181448c0167]::backend::ObjectProduct as rustc_codegen_cranelift[44768bf7efe39717]::debuginfo::object::WriteDebugInfo>::add_debug_reloc
  13:        0x10908ee44 - <rustc_codegen_cranelift[44768bf7efe39717]::unwind_module::UnwindModule<cranelift_object[be37181448c0167]::backend::ObjectModule>>::finish
  14:        0x1090d5840 - rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::run_aot
  15:        0x1090e59b4 - <rustc_codegen_cranelift[44768bf7efe39717]::CraneliftCodegenBackend as rustc_codegen_ssa[a3d2cc46dea2e7c2]::traits::backend::CodegenBackend>::codegen_crate
  16:        0x110213840 - <rustc_interface[69ef0626fe093afc]::queries::Linker>::codegen_and_build_linker
  17:        0x10f8a8a7c - rustc_interface[69ef0626fe093afc]::passes::create_and_enter_global_ctxt::<core[f1dce288aaae9328]::option::Option<rustc_interface[69ef0626fe093afc]::queries::Linker>, rustc_driver_impl[7f7da6b576ab5781]::run_compiler::{closure#0}::{closure#2}>
  18:        0x10f8f22d8 - rustc_interface[69ef0626fe093afc]::interface::run_compiler::<(), rustc_driver_impl[7f7da6b576ab5781]::run_compiler::{closure#0}>::{closure#1}
  19:        0x10f8e7e1c - std[4363f048fae9c8af]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[69ef0626fe093afc]::util::run_in_thread_with_globals<rustc_interface[69ef0626fe093afc]::util::run_in_thread_pool_with_globals<rustc_interface[69ef0626fe093afc]::interface::run_compiler<(), rustc_driver_impl[7f7da6b576ab5781]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  20:        0x10f8f80d0 - <std[4363f048fae9c8af]::thread::lifecycle::spawn_unchecked<rustc_interface[69ef0626fe093afc]::util::run_in_thread_with_globals<rustc_interface[69ef0626fe093afc]::util::run_in_thread_pool_with_globals<rustc_interface[69ef0626fe093afc]::interface::run_compiler<(), rustc_driver_impl[7f7da6b576ab5781]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f1dce288aaae9328]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  21:        0x111aae1a4 - <std[4363f048fae9c8af]::sys::thread::unix::Thread>::new::thread_start
  22:        0x193eabc08 - __pthread_cond_wait

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/Volumes/hynixP41/systolic_array_performance/rustc-ice-2026-03-08T18_10_01-1819.txt` to your bug report

note: rustc 1.96.0-nightly (e370b60cf 2026-03-07) running on aarch64-apple-darwin

note: compiler flags: -Z codegen-backend=cranelift -C target-cpu=native

query stack during panic:
end of query stack

thread '<unnamed>' (1894922) panicked at /rustc-dev/e370b60cf2b0d3e4b55923ec1558c5b5f8970cfb/compiler/rustc_codegen_cranelift/src/debuginfo/object.rs:89:14:
called `Result::unwrap()` on an `Err` value: Error("unimplemented relocation Relocation { offset: 32, symbol: SymbolId(13), addend: 0, flags: Generic { kind: Relative, encoding: Generic, size: 32 } }")
stack backtrace:
   0:        0x111ab0c28 - <<std[4363f048fae9c8af]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[f1dce288aaae9328]::fmt::Display>::fmt
   1:        0x10ec7ac28 - core[f1dce288aaae9328]::fmt::write
   2:        0x111ac8418 - <std[4363f048fae9c8af]::sys::stdio::unix::Stderr as std[4363f048fae9c8af]::io::Write>::write_fmt
   3:        0x111a872f4 - std[4363f048fae9c8af]::panicking::default_hook::{closure#0}
   4:        0x111aa3110 - std[4363f048fae9c8af]::panicking::default_hook
   5:        0x10f8eec90 - std[4363f048fae9c8af]::panicking::update_hook::<alloc[d0e3ae77f8b00750]::boxed::Box<rustc_driver_impl[7f7da6b576ab5781]::install_ice_hook::{closure#1}>>::{closure#0}
   6:        0x111aa3474 - std[4363f048fae9c8af]::panicking::panic_with_hook
   7:        0x111a8739c - std[4363f048fae9c8af]::panicking::panic_handler::{closure#0}
   8:        0x111a7dd40 - std[4363f048fae9c8af]::sys::backtrace::__rust_end_short_backtrace::<std[4363f048fae9c8af]::panicking::panic_handler::{closure#0}, !>
   9:        0x111a8896c - __rustc[530e92af27cdbe53]::rust_begin_unwind
  10:        0x114ac3b8c - core[f1dce288aaae9328]::panicking::panic_fmt
  11:        0x114ac38f4 - core[f1dce288aaae9328]::result::unwrap_failed
  12:        0x1090d8bd4 - <cranelift_object[be37181448c0167]::backend::ObjectProduct as rustc_codegen_cranelift[44768bf7efe39717]::debuginfo::object::WriteDebugInfo>::add_debug_reloc
  13:        0x10908ee44 - <rustc_codegen_cranelift[44768bf7efe39717]::unwind_module::UnwindModule<cranelift_object[be37181448c0167]::backend::ObjectModule>>::finish
  14:        0x10907f6f4 - rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::module_codegen::{closure#0}
  15:        0x109070b4c - std[4363f048fae9c8af]::sys::backtrace::__rust_begin_short_backtrace::<rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::module_codegen::{closure#0}, core[f1dce288aaae9328]::result::Result<rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::ModuleCodegenResult, alloc[d0e3ae77f8b00750]::string::String>>
  16:        0x1090839ac - <std[4363f048fae9c8af]::thread::lifecycle::spawn_unchecked<rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::module_codegen::{closure#0}, core[f1dce288aaae9328]::result::Result<rustc_codegen_cranelift[44768bf7efe39717]::driver::aot::ModuleCodegenResult, alloc[d0e3ae77f8b00750]::string::String>>::{closure#1} as core[f1dce288aaae9328]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  17:        0x111aae1a4 - <std[4363f048fae9c8af]::sys::thread::unix::Thread>::new::thread_start
  18:        0x193eabc08 - __pthread_cond_wait

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/Volumes/hynixP41/systolic_array_performance/rustc-ice-2026-03-08T18_10_01-1819.txt` to your bug report

note: rustc 1.96.0-nightly (e370b60cf 2026-03-07) running on aarch64-apple-darwin

note: compiler flags: -Z codegen-backend=cranelift -C target-cpu=native

query stack during panic:
end of query stack

rustc-ice-2026-03-08T18_10_01-1819.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information at runtime in generated code.C-bugCategory: This is a bug.O-armTarget: ARM processors (arm, thumb and AArch64 targets)O-macosOperating system: MacOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions