[Bug target/94087] std::random_device often fails when used from multiple threads
coryan+gccbugzilla at google dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 9 12:10:14 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087
Carlos O'Ryan <coryan+gccbugzilla at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |---
Status|RESOLVED |UNCONFIRMED
--- Comment #7 from Carlos O'Ryan <coryan+gccbugzilla at google dot com> ---
(In reply to Jonathan Wakely from comment #6)
> (In reply to Carlos O'Ryan from comment #0)
> > Creating and using a `std::random_device` object fails when used from
> > multiple threads.
>
> That's undefined behaviour. Calling non-const member functions on a single
> object from multiple threads is always undefined unless specified otherwise.
Each thread is creating its own `std::random_device` so I do not believe this
is applicable.
More information about the Gcc-bugs
mailing list