Skip to content

ICE: called Result::unwrap() on an Err value: ParseIntError { kind: PosOverflow } #147757

@YuanchengJiang

Description

@YuanchengJiang

Code

fn run_fut<T>(fut: impl Future<Output = T>) -> T {
    loop {
    }
    println!("%65536$", 1);
}

Meta

rustc 1.90.0 (1159e78c4 2025-09-14)
binary: rustc
commit-hash: 1159e78c4747b02ef996e55082b704c09b970588
commit-date: 2025-09-14
host: x86_64-unknown-linux-gnu
release: 1.90.0
LLVM version: 20.1.8

Error output

thread 'rustc' panicked at compiler/rustc_builtin_macros/src/format_foreign.rs:419:85:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }
stack backtrace:
   0:     0x7f8614200f83 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hdcfcb6d4c8489523
   1:     0x7f8614a02d77 - core::fmt::write::h8a494366950f23bb
   2:     0x7f8615dd14d1 - std::io::Write::write_fmt::h6556609fca33d0b1
   3:     0x7f8614200de2 - std::sys::backtrace::BacktraceLock::print::hb2a626a81e06b2dc
   4:     0x7f8614204887 - std::panicking::default_hook::{{closure}}::h4f78485264f12d10
   5:     0x7f86142043eb - std::panicking::default_hook::h2c66fc99e962531d
   6:     0x7f86132627e3 - std[9479b33d5e275715]::panicking::update_hook::<alloc[252dd2b3abdfe4a]::boxed::Box<rustc_driver_impl[773a1ede480c2143]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f86142050ce - std::panicking::rust_panic_with_hook::h33ac55f64bbd807d
   8:     0x7f8614204dca - std::panicking::begin_panic_handler::{{closure}}::h30e7cb89678a57fe
   9:     0x7f8614201459 - std::sys::backtrace::__rust_end_short_backtrace::hed60f27456c16ced
  10:     0x7f8614204aad - __rustc[de2ca18b4c54d5b8]::rust_begin_unwind
  11:     0x7f86108d01a0 - core::panicking::panic_fmt::h62f63d096dd276af
  12:     0x7f8610afb3e6 - core::result::unwrap_failed::h95bc3f5a607b2c95
  13:     0x7f861306ad57 - <rustc_builtin_macros[2cfffdb0ac72bd09]::format_foreign::printf::Substitutions as core[42326c15e70145c1]::iter::traits::iterator::Iterator>::next
  14:     0x7f86155c9e27 - rustc_builtin_macros[2cfffdb0ac72bd09]::format::make_format_args
  15:     0x7f86155c38f8 - rustc_builtin_macros[2cfffdb0ac72bd09]::format::expand_format_args_impl
  16:     0x7f8615efb9cf - <rustc_expand[7e4e12980218e6a2]::expand::MacroExpander>::fully_expand_fragment
  17:     0x7f8615ef30a9 - <rustc_expand[7e4e12980218e6a2]::expand::MacroExpander>::expand_crate
  18:     0x7f86155ea67d - rustc_interface[c9c4c8df4db17049]::passes::configure_and_expand
  19:     0x7f8615b9ee61 - rustc_interface[c9c4c8df4db17049]::passes::resolver_for_lowering_raw
  20:     0x7f8615b9ebcd - rustc_query_impl[4e8a788e737bdb2b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4e8a788e737bdb2b]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[581473cc959b0df7]::query::erase::Erased<[u8; 16usize]>>
  21:     0x7f8615b9eba7 - <rustc_query_impl[4e8a788e737bdb2b]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[42326c15e70145c1]::ops::function::FnOnce<(rustc_middle[581473cc959b0df7]::ty::context::TyCtxt, ())>>::call_once
  22:     0x7f8615ad3547 - rustc_query_system[5711f675e4c02644]::query::plumbing::try_execute_query::<rustc_query_impl[4e8a788e737bdb2b]::DynamicConfig<rustc_query_system[5711f675e4c02644]::query::caches::SingleCache<rustc_middle[581473cc959b0df7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[4e8a788e737bdb2b]::plumbing::QueryCtxt, false>
  23:     0x7f8615ad30d6 - rustc_query_impl[4e8a788e737bdb2b]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
  24:     0x7f8615e17d36 - rustc_interface[c9c4c8df4db17049]::passes::create_and_enter_global_ctxt::<core[42326c15e70145c1]::option::Option<rustc_interface[c9c4c8df4db17049]::queries::Linker>, rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  25:     0x7f8615cc11f1 - rustc_interface[c9c4c8df4db17049]::interface::run_compiler::<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}
  26:     0x7f8615b751c1 - std[9479b33d5e275715]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_with_globals<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_pool_with_globals<rustc_interface[c9c4c8df4db17049]::interface::run_compiler<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  27:     0x7f8615b74ea2 - <<std[9479b33d5e275715]::thread::Builder>::spawn_unchecked_<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_with_globals<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_pool_with_globals<rustc_interface[c9c4c8df4db17049]::interface::run_compiler<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[42326c15e70145c1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:     0x7f8615b7a7c5 - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8
  29:     0x7f860f49cb7b - <unknown>
  30:     0x7f860f51a5f0 - __clone
  31:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions