Skip to content

runtime: deterministic fallback hashes across process boundary #66885

@prattmic

Description

@prattmic

Map hashes use pre-process unique seeds to ensure that hashes differ across processes: aeskeysched for AES hash, and hashkey for fallback hash. Both are initialized in alginit.

https://go.dev/cl/516860 refactored the rand implementation in the runtime. Initialization of aeskeysched was changed to use bootstrapRand (available early), while hashkey was initialized with rand. rand's seed is not initialized until after alginit, so hashkey ends up with a deterministic value in every single process! Because hashkey is deterministic, so to are all (fallback) hashes.

cc @randall77 @rsc

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.release-blocker

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions