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

2020-07-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

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

2020-07-09 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #26 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:bbf9d358ae2104a09fc1b61e2b818928b6591831 commit r10-8448-gbbf9d358ae2104a09fc1b61e2b818928b6591831 Author: Jonathan Wake

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

2020-07-09 Thread a...@cloudius-systems.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #25 from Avi Kivity --- Requesting a backport to gcc 10. We're hitting this even when not called in a loop.

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

2020-05-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

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

2020-05-19 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #24 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:a2d196e75cef95c2b70734ad02e94f9da0e769fe commit r11-506-ga2d196e75cef95c2b70734ad02e94f9da0e769fe Author: Jonathan Wakely Date:

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Jonathan Wakely changed: What|Removed |Added Version|9.2.1 |10.1.0 Target Milestone|---

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #22 from Jonathan Wakely --- (In reply to rguent...@suse.de from comment #20) > Doh. OK, guess I'd set up the twister in all cases and make it > programatically skip itself when rdrand/rdseed is available so we > could easily fall b

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #21 from Jonathan Wakely --- (In reply to rguent...@suse.de from comment #18) > Note in virtualized environments support for RDRAND might be disabled > while RDSEED is enabled(?) even if no such hardware configuration > exists [by now

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

2020-05-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #20 from rguenther at suse dot de --- On Thu, 14 May 2020, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 > > --- Comment #19 from Jonathan Wakely --- > If you mean the mersenne twister in the s

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #19 from Jonathan Wakely --- If you mean the mersenne twister in the std::random_device object, that's a union member and doesn't exist when a proper source (/dev/random, rdrand, rdseed etc) is available. So we'd need to add *another*

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

2020-05-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #18 from 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 --- > (In reply to Jonathan Wakely from comment #13)

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

2020-05-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #17 from rguenther at suse dot de --- On Thu, 14 May 2020, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 > > --- Comment #14 from Jonathan Wakely --- > (In reply to Jonathan Wakely from comment

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

2020-05-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #16 from rguenther at suse dot de --- On Thu, 14 May 2020, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 > > --- Comment #12 from Jonathan Wakely --- > (In reply to wnereiz from comment #9) > >

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

2020-05-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #15 from H.J. Lu --- (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

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #14 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #13) > I'd rather not have to do everything shown at > https://software.intel.com/content/www/us/en/develop/articles/intel-digital- > random-number-generator-drng-

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #13 from Jonathan Wakely --- We could do this easily enough (which could be simplified if RDRAND is guaranteed to be available when RDSEED is available): --- a/libstdc++-v3/src/c++11/random.cc +++ b/libstdc++-v3/src/c++11/random.cc @

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

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #12 from Jonathan Wakely --- (In reply to wnereiz from comment #9) > This issue seems not limit to a certain GCC version. I tried the code with > gcc7, gcc9 and gcc10 on openSUSE Tumbleweed. All failed. As Richard said, the code to u

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

2020-05-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Richard Biener changed: What|Removed |Added CC||hjl.tools at gmail dot com,

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

2020-05-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

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

2020-04-22 Thread wnereiz at kawashiro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 wnereiz at kawashiro dot org changed: What|Removed |Added CC||wnereiz at kawashiro dot or

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

2020-03-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #8 from Jonathan Wakely --- Sorry, I read "Creating and using **a** `std::random_device` object fails when used from multiple threads" to mean creating one object, and then apparently didn't read the code properly to dispel my misunde

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

2020-03-09 Thread coryan+gccbugzilla at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Carlos O'Ryan changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

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

2020-03-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

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

2020-03-08 Thread coryan+gccbugzilla at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #4 from Carlos O'Ryan --- (In reply to Andrew Pinski from comment #1) > >The bug is *not* present on on Fedora:31 where the compiler reports: > > I doubt it is version based but rather based on what the CPU you are running > on. I

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

2020-03-08 Thread coryan+gccbugzilla at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #5 from Carlos O'Ryan --- (In reply to Andrew Pinski from comment #2) > (In reply to Andrew Pinski from comment #1) > > >The bug is *not* present on on Fedora:31 where the compiler reports: > > > > I doubt it is version based but rat

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

2020-03-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #3 from Andrew Pinski --- https://software.intel.com/sites/default/files/managed/98/4a/DRNG_Software_Implementation_Guide_2.1.pdf 5.3.1 Retry Recommendations ... If only one thread is calling RDSEED infrequently, it is very unlikely

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

2020-03-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #1 from Andrew Pinski --- >The bug is *not* present on on Fedora:31 where the compiler reports: I doubt it is version based but rather based on what the CPU you are running on.

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

2020-03-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087 --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > >The bug is *not* present on on Fedora:31 where the compiler reports: > > I doubt it is version based but rather based on what the CPU you are running > on. I M