You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consistent output between invocations, across all platforms.
What did you see instead?
When I run this program built locally with go1.11.2 or go1.11.4, I'm sometimes getting 1810a846745d4bc329c923c76786416d75dbd711eb369a824ebcff3078d22519, sometimes b2d4c5a6c6683cab81962ba61e71a2dec2869ce947078958413b686a0ca48c7f.
When I run this program built locally with go1.10.3, I'm always getting 1810a846745d4bc329c923c76786416d75dbd711eb369a824ebcff3078d22519.
When I run this program on play.golang.org, I'm always getting b2d4c5a6c6683cab81962ba61e71a2dec2869ce947078958413b686a0ca48c7f.
This is not specific to PRNG implementation, either. When I replace math/randSource PRNG with PCG RNG, the issue still persists.
Some invocations seem to consume more RNG values, as seen in this example: https://play.golang.org/p/W1bTSIb5FYD (always 426 on play.golang.org, always 206 on go1.10.3, 206 or 426 on go1.11.2 and go1.11.4).
The text was updated successfully, but these errors were encountered:
Certain crypto operations, including ecdsa.Sign, rsa.EncryptPKCS1v15 and rsa.GenerateKey, now randomly read an extra byte of randomness to ensure tests don't rely on internal behavior.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/v9ajjMHKx5M
What did you expect to see?
Consistent output between invocations, across all platforms.
What did you see instead?
When I run this program built locally with go1.11.2 or go1.11.4, I'm sometimes getting
1810a846745d4bc329c923c76786416d75dbd711eb369a824ebcff3078d22519
, sometimesb2d4c5a6c6683cab81962ba61e71a2dec2869ce947078958413b686a0ca48c7f
.When I run this program built locally with go1.10.3, I'm always getting
1810a846745d4bc329c923c76786416d75dbd711eb369a824ebcff3078d22519
.When I run this program on play.golang.org, I'm always getting
b2d4c5a6c6683cab81962ba61e71a2dec2869ce947078958413b686a0ca48c7f
.Additional notes
Creating a wrapped
Source
that locks and unlocks mutex on eachSource.Int63()
call doesn't resolve the issue: https://play.golang.org/p/JgJ4kM3UjY8This is not specific to PRNG implementation, either. When I replace
math/rand
Source
PRNG with PCG RNG, the issue still persists.Some invocations seem to consume more RNG values, as seen in this example: https://play.golang.org/p/W1bTSIb5FYD (always
426
on play.golang.org, always206
on go1.10.3,206
or426
on go1.11.2 and go1.11.4).The text was updated successfully, but these errors were encountered: