Drop flag statement creation depends on FxHashMap
interation order
#91943
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code creates MIR statements based on an
FxHashMap
iteration order:rust/compiler/rustc_mir_transform/src/elaborate_drops.rs
Lines 493 to 495 in 404c847
drop_flags
is defined as:rust/compiler/rustc_mir_transform/src/elaborate_drops.rs
Line 260 in 404c847
Since FxHashMap's fixed seed is different between 32 and 64 bit platforms, we may end up creating statements in a different order on 32-bit vs 64-bit hosts (the target platform passed to the compiler has no effect).
We should probably sort by
MovePathIndex
before creating the statements.The text was updated successfully, but these errors were encountered: