Skip to content

Codegen ICE on x87_f80 (nightly-2026-11-12): transmute_to size mismatch 128 vs 48 bits #5191

Closed

Description

@feliperodri

Kani panics during codegen on the new x87_f80 type that nightly-2026-11-12's core added on x86/x86_64.

#![feature(x87_f80)]
use std::arch::x86_64::x87_f80;
use std::mem::MaybeUninit;

#[kani::proof]
fn x87_f80_copy() {
    let m: MaybeUninit<x87_f80> = MaybeUninit::zeroed();
    let v: x87_f80 = unsafe { m.assume_init() };
    let _ = std::hint::black_box(v);
}
$ kani x87.rs
thread 'rustc' panicked at cprover_bindings/src/goto_program/expr.rs:1195:9:
assertion `left == right` failed
  left: 128
 right: 48
Kani unexpectedly panicked during compilation.

Kani main at faffcee3 (nightly-2026-11-12), CBMC 6.11.0.

Cause, as far as I can tell:

  • core::num::imp::x87_f80::x87_f80 is pub struct x87_f80(x87_f80_raw), and x87_f80_raw is an empty struct marked #[lang = "x87_f80_raw"]. Its size and alignment come from rustc: 16 bytes, i.e. the 128 bits in the assertion.
  • Kani builds the goto type from the struct's fields, so its size doesn't match rustc's layout.
  • Expr::transmute_to then asserts equal sizes and fails. In core it's reached through mem::transmute_neo::<MaybeUninit<x87_f80>, x87_f80>.
  • The type needs to be laid out from rustc's layout (e.g. as an opaque byte array or padded struct of layout.size), like other lang-item types whose layout the compiler defines.

Impact: this blocks verify-rust-std's sync to nightly-2026-11-12 (model-checking/verify-rust-std#766). kani autoharness / kani list --with-autoharness over the standard library abort while compiling core, so the Kani List, autoharness and Metrics jobs can't run.

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

    T-High Priority[F] Crash

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions