[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom
f.heckenbach@fh-soft.de
gcc-bugzilla@gcc.gnu.org
Mon Jul 22 12:33:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920
--- Comment #6 from Frank Heckenbach <f.heckenbach@fh-soft.de> ---
(In reply to Paolo Carlini from comment #3)
> I'm going to attach a patchlet which does the trick (fread -> read) for me.
> Note I'm on purpose disabling the use of __builtin_ia32_rdrand32_step on my
> x86_64 machine, the undef would not be in the committed patch of course.
>
> It would be great if you could test the change on your machines (in 4.7.x
> just change random.h, no need to rebuild) and confirm that everything is
> fine.
I did the equivalent change to /usr/include/c++/4.7/bits/random.h and it works
for me, thanks.
More information about the Gcc-bugs
mailing list