runtime: deterministic fallback hashes across process boundary #66885
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
Map hashes use pre-process unique seeds to ensure that hashes differ across processes:
aeskeysched
for AES hash, andhashkey
for fallback hash. Both are initialized inalginit
.https://go.dev/cl/516860 refactored the
rand
implementation in the runtime. Initialization ofaeskeysched
was changed to usebootstrapRand
(available early), whilehashkey
was initialized withrand
.rand
's seed is not initialized until afteralginit
, sohashkey
ends up with a deterministic value in every single process! Becausehashkey
is deterministic, so to are all (fallback) hashes.cc @randall77 @rsc
The text was updated successfully, but these errors were encountered: