go/src/crypto/rand
Jason A. Donenfeld 091e913414 crypto/rand: fix race on r.used
This race is benign, but it still trips up the race detector, so turn
this into an atomic read.

Fixes #52739.

Change-Id: Ib53362286b456513c8c69d6d2d73c6c90ec095f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/404475
Auto-Submit: Jason Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Jason Donenfeld <Jason@zx2c4.com>
2022-05-06 17:41:30 +00:00
..
example_test.go
rand.go crypto/rand: properly handle large Read on windows 2022-05-05 22:44:02 +00:00
rand_batched_test.go crypto/rand: properly handle large Read on windows 2022-05-05 22:44:02 +00:00
rand_getentropy.go crypto/rand: batch and buffer calls to getrandom/getentropy 2022-04-19 22:44:58 +00:00
rand_getrandom.go crypto/rand: apply the same max read size on Illumos as on Solaris 2022-04-20 16:05:16 +00:00
rand_js.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
rand_plan9.go crypto/rand: use fast key erasure RNG on plan9 instead of ANSI X9.31 2022-03-04 15:48:03 +00:00
rand_test.go
rand_unix.go crypto/rand: fix race on r.used 2022-05-06 17:41:30 +00:00
rand_windows.go crypto/rand: properly handle large Read on windows 2022-05-05 22:44:02 +00:00
util.go crypto/rand: make Prime not deterministic for a fixed input stream 2022-04-05 01:35:39 +00:00
util_test.go crypto/rand: make Prime not deterministic for a fixed input stream 2022-04-05 01:35:39 +00:00