aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-10-14 22:47:24 -0400
committerRuss Cox <rsc@golang.org>2017-10-25 20:24:03 +0000
commitd93cb46280ae4710c5c6113159c7973a08a72249 (patch)
tree6b3cac482598e995b5fd727ea574a50611d12997 /src/runtime/stack_test.go
parent78952c06c53c8455d03430b17b5a7fe2693b5d35 (diff)
downloadgo-d93cb46280ae4710c5c6113159c7973a08a72249.tar.xz
[release-branch.go1.9] runtime: use simple, more robust fastrandn
CL 36932 (speed up fastrandn) made it faster but introduced bad interference with some properties of fastrand itself, making fastrandn not very random in certain ways. In particular, certain selects are demonstrably unfair. For Go 1.10 the new faster fastrandn has induced a new fastrand, which in turn has caused other follow-on bugs that are still being discovered and fixed. For Go 1.9.2, just go back to the barely slower % implementation that we used in Go 1.8 and earlier. This should restore fairness in select and any other problems caused by the clever fastrandn. The test in this CL is copied from CL 62530. Fixes #22253. Change-Id: Ibcf948a7bce981452e05c90dbdac122043f6f813 Reviewed-on: https://go-review.googlesource.com/70991 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/stack_test.go')
0 files changed, 0 insertions, 0 deletions