Rust: Reproducibility regression caused by 57edf88

Created on 8 Sep 2020  路  5Comments  路  Source: rust-lang/rust

My nightly script that checks for reproducible builds of rustc failed this morning. Git bisect pointed me to 57edf88b400ff6c6ae1de255fbd7e3448aca4fb2 (#75138).

With that commit, about 12 rlibs have differences in my parallel builds (librustc_privacy is one) and nothing in the diff of the binaries jumps out as an obvious culprit.


A-reproducibility C-bug E-easy E-mentor I-prioritize T-compiler regression-from-stable-to-nightly

Most helpful comment

Ah, my bad. I can take this.

@rustbot claim

All 5 comments

The PR you linked to wasn't merged; I think you meant https://github.com/rust-lang/rust/pull/75138.

Ah, yes, sorry about that. The commit should be correct, though.

cc @jumbatm @oli-obk

oops, yea this is likely https://github.com/rust-lang/rust/blob/71569e420107ab034910a4687f382385975fa0b3/compiler/rustc_macros/src/session_diagnostic.rs#L621 (not sure if there are other hashset/hashmap iterations happening, but that's the only one I found).

So the fix is twofold: First change all the HashSet and HashMap to FxHashSet and FxHashMap where possible, and second, collect to a Vec and sort that Vec before iterating over the set/map

Ah, my bad. I can take this.

@rustbot claim

Was this page helpful?
0 / 5 - 0 ratings