[Pkg-rust-maintainers] Bug#1095862: rustc unsoundness/miscompilations on i386
Fabian Grünbichler
debian at fabian.gruenbichler.email
Thu Feb 13 06:51:29 GMT 2025
Source: rustc
Version: 1.84.0+dfsg1-1
Severity: serious
Tags: upstream
Justification: Policy 2.2.1
X-Debbugs-Cc: debian-rust at lists.debian.org, sylvestre at debian.org
Filing this bug to have a record in BTS - I'll file a separate one for
release.debian.org about the broader baseline question.
This issue came up back in November on debian-devel/-release:
https://lists.debian.org/debian-release/2024/11/msg00443.html
My original mail, partially wrongly summarizing the issue.
https://lists.debian.org/debian-release/2024/11/msg00445.html
My reponse linking to more upstream details, including why downgrading to i586
in LLVM/rustc doesn't work.
It boils down to the following:
- Debian's i386 baseline is currently 32-bit x86 without MMX or SSE (i686)
- Debian's LLVM and rustc packages accordingly patch their i686 targets to
remove SSE support, which would be part of that target's baseline upstream
otherwise [0,1]
- Upstream LLVM and rustc consider this combination unsound and unfixable (for
IMHO valid reasons) because it can cause subtle miscompilations leading to
runtime crashes, in addition to the (usual, expected) different semantics of
x87 and SSE2 floating point implementations [2,3]
I see the following options:
A) bump i386 baseline for Trixie to match LLVM/rustc's upstream i686 target,
i.e. Pentium 4 *with* MMX and SSE2 (separate RT bug will be filed shortly)
B) RC-ignore this bug and implications for Trixie, bump baseline for Trixie+1
C) remove LLVM and rustc and all their transitive rdeps (this includes Firefox
and Chromium, most major Desktop environments, sequoia, and probably a bit
more) on i386 from Trixie, further reducing the usefulness of this arch
Personally (with my rustc maintainer hat on) I have a strong preference for A).
Please keep responses on details of A) to the corresponding release.debian.org
bug!
Fabian
0: https://salsa.debian.org/rust-team/rust/-/blob/debian/sid/debian/patches/behaviour/d-rustc-i686-baseline.patch?ref_type=heads
1: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/19/debian/patches/clang-baseline-fix-i386.patch
2: https://github.com/rust-lang/compiler-team/issues/808
3: https://github.com/rust-lang/rust/issues/114479#issuecomment-2072052116
More information about the Pkg-rust-maintainers
mailing list