[Issue 19836] New: Excessive probability of UUID collisions in std.uuid.randomUUID
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 28 19:04:44 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19836
Issue ID: 19836
Summary: Excessive probability of UUID collisions in
std.uuid.randomUUID
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: n8sh.secondary at hotmail.com
`std.uuid.randomUUID` defaults to using `rndGen`. Because every `rndGen` starts
in one of 2^^32 states then if 77000 independent programs each generate a
single UUID there is a 50% chance that at least two of them generate the same
initial UUID (and all
subsequent UUIDs from those programs would be identical as well). This problem
is shared by C++ boost::uuids::random_generator which also generates UUIDs
using a PRNG initialized with a 32-bit seed.
--
More information about the Digitalmars-d-bugs
mailing list