You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parallel compiler: static mut refs in lib not reproducible #162203
rustc --edition=2024 -Zremap-cwd-prefix=reproducible_dir --cap-lints=warn -Ccodegen-units=1 -Clink-dead-code=true -Zthreads=30 -o out c.rs >& /dev/null ; md5sum out
I expected to see this happen: equal md5sums
Instead, this happened:flipflopping md5s
479f094c3654ecbd0f7fb298a98c12e6 out
0e8d752e35f181aae67e3c4b925028bd out
0e8d752e35f181aae67e3c4b925028bd out
479f094c3654ecbd0f7fb298a98c12e6 out
479f094c3654ecbd0f7fb298a98c12e6 out
479f094c3654ecbd0f7fb298a98c12e6 out
479f094c3654ecbd0f7fb298a98c12e6 out
0e8d752e35f181aae67e3c4b925028bd out
479f094c3654ecbd0f7fb298a98c12e6 out
0e8d752e35f181aae67e3c4b925028bd out
479f094c3654ecbd0f7fb298a98c12e6 out
0e8d752e35f181aae67e3c4b925028bd out
0e8d752e35f181aae67e3c4b925028bd out
0e8d752e35f181aae67e3c4b925028bd out
479f094c3654ecbd0f7fb298a98c12e6 out
479f094c3654ecbd0f7fb298a98c12e6 out
0e8d752e35f181aae67e3c4b925028bd out
479f094c3654ecbd0f7fb298a98c12e6 out
The cause is as described in #162202 (comment) . Static mut refs generate DefId-s during const evel, in intern_as_new_static. When const eval is done in parallel, these DefId's order won't be deterministic.
Activity
susitsm commentedon Sep 9, 2026
The cause is as described in #162202 (comment) . Static mut refs generate
DefId-s during const evel, inintern_as_new_static. When const eval is done in parallel, theseDefId's order won't be deterministic.