]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] runtime: use bootstrapRand to initialize hashkey
authorMichael Pratt <mpratt@google.com>
Thu, 18 Apr 2024 16:42:43 +0000 (12:42 -0400)
committerJoedian Reid <joedian@google.com>
Fri, 26 Apr 2024 16:30:00 +0000 (16:30 +0000)
commit3f4af1ff0e0c3a83bc48faee3d1f0282ef4d02f2
treeb31465e2ec9e119ad79c3ffb33625d53f04c5cc3
parenta7ff78d5854b410f9126c7f807f4bc2fa4234bfd
[release-branch.go1.22] runtime: use bootstrapRand to initialize hashkey

The seed for rand is not initialized until after alginit. Before
initialization, rand returns a deterministic sequence, making hashkey
deterministic across processes.

Switch to bootstrapRand, like other early rand calls, such as
initialization of aeskeysched.

For #66885.
Fixes #66886.

Change-Id: I5023a9161232b49fda2ebd1d5f9338bbdd17b1fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/580136
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
(cherry picked from commit 1a3682b4c1e44f334c5cc8fbad3c28b853c2aff2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/580018
src/runtime/alg.go
src/runtime/map_test.go