about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2016-04-16 15:25:56 -0500
committerDoug Goldstein <cardoe@cardoe.com>2016-04-19 06:24:34 -0500
commitf875daca54b14d74a3b236b971b88d5e5f739b81 (patch)
treeff87be8f91dc18472c64b3757904afe7c8576ede /src/libsyntax/parse/parser.rs
parentd00782494b47ca7a4ae8e665f99ab10012b45f9c (diff)
downloadrust-f875daca54b14d74a3b236b971b88d5e5f739b81.tar.gz
rust-f875daca54b14d74a3b236b971b88d5e5f739b81.zip
rand: don't block before random pool is initialized
If we attempt a read with getrandom() on Linux the syscall can block
before the random pool is initialized unless the GRND_NONBLOCK flag is
passed. This flag causes getrandom() to instead return EAGAIN while the
pool is uninitialized. To avoid downstream users of crate or std
functionality that have no ability to avoid this blocking behavior this
change causes Rust to read bytes from /dev/urandom while getrandom()
would block and once getrandom() is available to use that. Fixes #32953.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions