]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Make spurious std::random_device FAIL less likely
authorJonathan Wakely <jwakely@redhat.com>
Tue, 9 Nov 2021 10:31:18 +0000 (10:31 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 9 Nov 2021 14:40:33 +0000 (14:40 +0000)
commit8d2d0a6c4391e462555db6d33b2cc00f3da0932f
treef1cafb56f14d44429d04a8a76932ee02bf0c800a
parent0318df0ae63e47f6b2f30e96205d00dcb3696538
libstdc++: Make spurious std::random_device FAIL less likely

It's possible that independent reads from /dev/random and /dev/urandom
could produce the same value by chance. Retry if that happens. The
chances of it happening twice are miniscule.

libstdc++-v3/ChangeLog:

* testsuite/26_numerics/random/random_device/cons/token.cc:
Retry if random devices produce the same value.
libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc