This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Jul 2013 20:38:15 +0000
- Subject: [Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom
- Auto-submitted: auto-generated
- References: <bug-57920-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-07-21
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Ever confirmed|0 |1
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
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.