]> Cypherpunks repositories - gostls13.git/commit
runtime: use bootstrapRand to initialize hashkey
authorMichael Pratt <mpratt@google.com>
Thu, 18 Apr 2024 16:42:43 +0000 (12:42 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 19 Apr 2024 16:34:32 +0000 (16:34 +0000)
commit1a3682b4c1e44f334c5cc8fbad3c28b853c2aff2
treeeaa8a711a1fa890fd7ff3f201049627c5fbf9119
parent1a0b86375fad202048adb88cba4caec535a52a45
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.

Fixes #66885.

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>
src/runtime/alg.go
src/runtime/map_test.go