Re:RDRAND on AMD Ryzen 9 5900X is flakey
by rcxdude on Monday January 11, 2021 @04:42PM
(#25737684)
I doubt it, a compiler bug like failing to consider rdrand volatile would not occasionally fail, but would fail consistently (perhaps every nth iteration, but it would have a pattern). I struggle to see how a compiler could miscompile it to make it inconsistent.
[ Parent
| on HN ]
Re:RDRAND on AMD Ryzen 9 5900X is flakey
by dragontamer on Monday January 11, 2021 @05:16PM
(#25738214)
32-bit is also a pretty bad RNG to test in this manner.
Birthday paradox says that you'll only need 2^16 (65,536) runs before you get a collision. 64-bit would have a collision in one in 2^32 (4-billion). With 2000 x 10 tests (== 20,000 tests per run), there's a pretty high chance of a collision actually.
There's a lot of issues complicating the testing of something like this. I'm sure the core fact (that RDRAND might be doing something wrong) is there. But to properly vet all issues and actually get to the bottom of this bug will take some effort.