Opened 8 years ago
Closed 7 years ago
#10980 closed Bugs (fixed)
boost::random::random_device bug with /dev/random
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | random |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | random_device | Cc: |
Description
There is a bug in boost 1.56 random_device implementation where it can fail to read from /dev/random with an exception
"boost::random_device: EOF while reading random-number pseudo-device /dev/random: Success"
The boost random_device code attempts to read 4 bytes from /dev/random, gets fewer but >0 bytes because /dev/random temporarily runs out of random data, and boost random_device incorrectly concludes that end of file has been reached and throws an exception, where it should just try to read more bytes.
Change History (2)
comment:1 by , 8 years ago
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Here's a patch: