[webkit-reviews] review granted: [Bug 98627] Using float/double as WTF hash table key is unreliable. : [Attachment 167498] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 7 20:29:57 PDT 2012


Geoffrey Garen <ggaren at apple.com> has granted Andreas Kling
<kling at webkit.org>'s request for review:
Bug 98627: Using float/double as WTF hash table key is unreliable.
https://bugs.webkit.org/show_bug.cgi?id=98627

Attachment 167498: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=167498&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=167498&action=review


r=me

Do we need to test positive infinity vs negative infinity? How about NaN?

I guessed that the errors caused by your size=8 patch would be due to smoking
out bugs in cases of collisions. I'm surprised by how many bugs there were!

Perhaps it's worth doing a test run where you artificially make the first level
hash for all hash tables ==0, just in case there are more issues like this.

> Source/WTF/wtf/HashFunctions.h:108
> +	   typedef typename IntTypes<sizeof(T)>::UnsignedType FlattenedType;

FWIW, I usually call a type like this "Bits".


More information about the webkit-reviews mailing list