2 ms·
I wonder if there is a way to provoke hash collisions. A while back there was a bug in Python dicts that let you do that. Construct a bunch of strings that hash
by captainmuon 10y ago
I wonder if there is a way to provoke hash collisions. A while back there was a bug in Python dicts that let you do that. Construct a bunch of strings that hash to the same bucket, and feed that to an application that tries to store them in the dict, and you could cause extreme resource consumption IIRC. The remedy was to add a random (per-process) part to the key function. It would be interesting to see if Swift/ObjC has this vulnerability, too.