]> Cypherpunks repositories - gostls13.git/commit
runtime: overwrite startupRand instead of clearing it
authorFilippo Valsorda <filippo@golang.org>
Mon, 26 Aug 2024 18:00:10 +0000 (20:00 +0200)
committerFilippo Valsorda <filippo@golang.org>
Mon, 7 Oct 2024 15:35:02 +0000 (15:35 +0000)
commit9a44b8e15a0444460358495e5ed2dc78a3470675
treee2b0c6f892ad06fc4eeeaec28f3d50439d192204
parent311372c53c21740c3427f08470ed1acd1c89f81b
runtime: overwrite startupRand instead of clearing it

AT_RANDOM is unfortunately used by libc before we run (so make sure it's
not cleared) but also is available to cgo programs after we did. It
would be unfortunate if a cgo program assumed it could use AT_RANDOM but
instead found all zeroes there.

Change-Id: I82eff34d8cf5a499b439052b7827b8ef7cabc21d
Reviewed-on: https://go-review.googlesource.com/c/go/+/608437
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/runtime/os_linux.go
src/runtime/os_openbsd.go
src/runtime/rand.go