• David du Colombier's avatar
    runtime: don't use /dev/random on Plan 9 · 5c2233f2
    David du Colombier authored
    Plan 9 provides a /dev/random device to return a
    stream of random numbers. However, the method used
    to generate random numbers on Plan 9 is slow and
    reading from /dev/random may block.
    
    We don't want our Go programs to be significantly
    slowed down just to slightly improve the distribution
    of hash values.
    
    So, we do the same thing as NaCl and rely exclusively
    on extendRandom to generate pseudo-random numbers.
    
    Fixes #10028.
    
    Change-Id: I7e11a9b109c22f23608eb09c406b7c3dba31f26a
    Reviewed-on: https://go-review.googlesource.com/6386Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    5c2233f2
os1_plan9.go 4.86 KB