[Bug target/94087] std::random_device often fails when used from multiple threads

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Thu May 14 11:41:03 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087

--- Comment #18 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 14 May 2020, hjl.tools at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087
> 
> --- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
> (In reply to Jonathan Wakely from comment #13)
> > We could do this easily enough (which could be simplified if RDRAND is
> > guaranteed to be available when RDSEED is available):
> > 
> 
> All Intel processors with RDSEED supports RDRAND which requires checking
> of the CF bit in EFLAGS.

Note in virtualized environments support for RDRAND might be disabled
while RDSEED is enabled(?) even if no such hardware configuration
exists [by now].  If I were a chip manufacturer (hello VIA?) that
at the moment neither implements RDRAND nor RDSEED a good option
would be to only go for the stronger RDSEED and leave RDRAND 
unimplemented.


More information about the Gcc-bugs mailing list