rust-lang / rust-lang/rust

Compiler panic while building blink.cmp

Open
#144,725 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-ICE S-needs-info S-needs-repro T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Code

I believe this failure happened while compiling https://github.com/Saghen/blink.cmp

Meta

rustc --version --verbose:

rustc 1.90.0-nightly (3048886e5 2025-07-30)
binary: rustc
commit-hash: 3048886e59c94470e726ecaaf2add7242510ac11
commit-date: 2025-07-30
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.8

Note the failure only happens when building with --release

Error output

Find the error attached

rustc-ice-2025-07-31T09_25_04-902588.txt

Details

thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
Box<dyn Any>
stack backtrace:
   0:     0x7cfe5f9c5045 - std::backtrace::Backtrace::create::h4dc8ea8dbd9899a1
   1:     0x7cfe5f9c4f95 - std::backtrace::Backtrace::force_capture::h74fa04344d3048dc
   2:     0x7cfe5ea61910 - std[252cdfc11d70884]::panicking::update_hook::<alloc[625f969b2fa307d4]::boxed::Box<rustc_driver_impl[5876898155789fc0]::install_ice_hook::{closure#1}>>::{closure#0}
   3:     0x7cfe5f9df1ae - std::panicking::rust_panic_with_hook::h2abbcd676a345b6f
   4:     0x7cfe5ea9a631 - std[252cdfc11d70884]::panicking::begin_panic::<rustc_errors[a56b846fd2698ae1]::ExplicitBug>::{closure#0}
   5:     0x7cfe5ea8f5c6 - std[252cdfc11d70884]::sys::backtrace::__rust_end_short_backtrace::<std[252cdfc11d70884]::panicking::begin_panic<rustc_errors[a56b846fd2698ae1]::ExplicitBug>::{closure#0}, !>
   6:     0x7cfe5ea8c085 - std[252cdfc11d70884]::panicking::begin_panic::<rustc_errors[a56b846fd2698ae1]::ExplicitBug>
   7:     0x7cfe5eaa4081 - <rustc_errors[a56b846fd2698ae1]::diagnostic::BugAbort as rustc_errors[a56b846fd2698ae1]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   8:     0x7cfe5f01127c - <rustc_errors[a56b846fd2698ae1]::DiagCtxtHandle>::span_bug::<rustc_span[e212defa68e1f0f]::span_encoding::Span, alloc[625f969b2fa307d4]::string::String>
   9:     0x7cfe5f0a6177 - rustc_middle[5b597aebfad1dd36]::util::bug::opt_span_bug_fmt::<rustc_span[e212defa68e1f0f]::span_encoding::Span>::{closure#0}
  10:     0x7cfe5f08566a - rustc_middle[5b597aebfad1dd36]::ty::context::tls::with_opt::<rustc_middle[5b597aebfad1dd36]::util::bug::opt_span_bug_fmt<rustc_span[e212defa68e1f0f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  11:     0x7cfe5f0854db - rustc_middle[5b597aebfad1dd36]::ty::context::tls::with_context_opt::<rustc_middle[5b597aebfad1dd36]::ty::context::tls::with_opt<rustc_middle[5b597aebfad1dd36]::util::bug::opt_span_bug_fmt<rustc_span[e212defa68e1f0f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  12:     0x7cfe5d055027 - rustc_middle[5b597aebfad1dd36]::util::bug::span_bug_fmt::<rustc_span[e212defa68e1f0f]::span_encoding::Span>
  13:     0x7cfe5d5f5698 - <rustc_mir_transform[57d1aa0078e0a27a]::validate::CfgChecker>::fail::<alloc[625f969b2fa307d4]::string::String>
  14:     0x7cfe614c7d47 - <rustc_mir_transform[57d1aa0078e0a27a]::validate::Validator as rustc_mir_transform[57d1aa0078e0a27a]::pass_manager::MirPass>::run_pass
  15:     0x7cfe60211828 - rustc_mir_transform[57d1aa0078e0a27a]::run_optimization_passes
  16:     0x7cfe60e77f00 - rustc_mir_transform[57d1aa0078e0a27a]::optimized_mir
  17:     0x7cfe60e77ae1 - rustc_query_impl[bc1f4b486f051a3d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[bc1f4b486f051a3d]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5b597aebfad1dd36]::query::erase::Erased<[u8; 8usize]>>
  18:     0x7cfe60218525 - rustc_query_system[25bc80909c950048]::query::plumbing::try_execute_query::<rustc_query_impl[bc1f4b486f051a3d]::DynamicConfig<rustc_query_system[25bc80909c950048]::query::caches::DefIdCache<rustc_middle[5b597aebfad1dd36]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[bc1f4b486f051a3d]::plumbing::QueryCtxt, false>
  19:     0x7cfe60217a1b - rustc_query_impl[bc1f4b486f051a3d]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  20:     0x7cfe5cb2b73b - <rustc_middle[5b597aebfad1dd36]::ty::context::TyCtxt>::instance_mir
  21:     0x7cfe60e8e294 - rustc_mir_transform[57d1aa0078e0a27a]::inline::process_blocks::<rustc_mir_transform[57d1aa0078e0a27a]::inline::NormalInliner>
  22:     0x7cfe60dfa400 - <rustc_mir_transform[57d1aa0078e0a27a]::inline::Inline as rustc_mir_transform[57d1aa0078e0a27a]::pass_manager::MirPass>::run_pass
  23:     0x7cfe60211551 - rustc_mir_transform[57d1aa0078e0a27a]::run_optimization_passes
  24:     0x7cfe60e77f00 - rustc_mir_transform[57d1aa0078e0a27a]::optimized_mir
  25:     0x7cfe60e77ae1 - rustc_query_impl[bc1f4b486f051a3d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[bc1f4b486f051a3d]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[5b597aebfad1dd36]::query::erase::Erased<[u8; 8usize]>>
  26:     0x7cfe60218525 - rustc_query_system[25bc80909c950048]::query::plumbing::try_execute_query::<rustc_query_impl[bc1f4b486f051a3d]::DynamicConfig<rustc_query_system[25bc80909c950048]::query::caches::DefIdCache<rustc_middle[5b597aebfad1dd36]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[bc1f4b486f051a3d]::plumbing::QueryCtxt, false>
  27:     0x7cfe60217a1b - rustc_query_impl[bc1f4b486f051a3d]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7cfe60d8514c - <rustc_metadata[15c89b4175c4a52b]::rmeta::encoder::EncodeContext>::encode_crate_root
  29:     0x7cfe617cda30 - <rustc_metadata[15c89b4175c4a52b]::rmeta::encoder::encode_metadata::{closure#3} as core[f23c4ce622767e30]::ops::function::FnOnce<(rustc_middle[5b597aebfad1dd36]::ty::context::TyCtxt, &std[252cdfc11d70884]::path::Path)>>::call_once
  30:     0x7cfe617cac70 - rustc_metadata[15c89b4175c4a52b]::rmeta::encoder::encode_metadata
  31:     0x7cfe610eabd7 - rustc_metadata[15c89b4175c4a52b]::fs::encode_and_write_metadata
  32:     0x7cfe6166c643 - <rustc_interface[46364056eeddd9e7]::queries::Linker>::codegen_and_build_linker
  33:     0x7cfe6166a23c - rustc_interface[46364056eeddd9e7]::passes::create_and_enter_global_ctxt::<core[f23c4ce622767e30]::option::Option<rustc_interface[46364056eeddd9e7]::queries::Linker>, rustc_driver_impl[5876898155789fc0]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  34:     0x7cfe61493e71 - rustc_interface[46364056eeddd9e7]::interface::run_compiler::<(), rustc_driver_impl[5876898155789fc0]::run_compiler::{closure#0}>::{closure#1}
  35:     0x7cfe61392a81 - std[252cdfc11d70884]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[46364056eeddd9e7]::util::run_in_thread_with_globals<rustc_interface[46364056eeddd9e7]::util::run_in_thread_pool_with_globals<rustc_interface[46364056eeddd9e7]::interface::run_compiler<(), rustc_driver_impl[5876898155789fc0]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:     0x7cfe61392762 - <<std[252cdfc11d70884]::thread::Builder>::spawn_unchecked_<rustc_interface[46364056eeddd9e7]::util::run_in_thread_with_globals<rustc_interface[46364056eeddd9e7]::util::run_in_thread_pool_with_globals<rustc_interface[46364056eeddd9e7]::interface::run_compiler<(), rustc_driver_impl[5876898155789fc0]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f23c4ce622767e30]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7cfe61398805 - std::sys::pal::unix::thread::Thread::new::thread_start::h63564cc3addf83a5
  38:     0x7cfe5aa9caa4 - start_thread
                               at ./nptl/pthread_create.c:447:8
  39:     0x7cfe5ab29c3c - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
  40:                0x0 - <unknown>


rustc version: 1.90.0-nightly (3048886e5 2025-07-30)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [optimized_mir] optimizing MIR for `smith_waterman::simd::algorithm::smith_waterman_inner`
#1 [optimized_mir] optimizing MIR for `incremental::bucket::<impl at /home/rdelfin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/frizbee-0.4.2/src/incremental/bucket.rs:49:1: 55:49>::process`
end of query stack

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure while building blink.cmp with --release using rustc 1.90.0-nightly. Read compiler/rustc_mir_transform/src/validate.rs and follow the optimized_mir query stack for smith_waterman::simd::algorithm::smith_waterman_inner and frizbee's incremental/bucket.rs process. Done means identifying a minimal reproducer and confirming the compiler no longer panics on it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.