[Webkit-unassigned] [Bug 26334] New: WTF::FloatHash is invalid for 0 / -0

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 11 15:39:30 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26334

           Summary: WTF::FloatHash is invalid for 0 / -0
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ggaren at apple.com


Because FloatHash does a bitwise hash, 0 and -0 get different hash values, even
though they compare equal. That's a hash table no-no.

More info here: http://virtualdub.org/blog/pivot/entry.php?id=259.

Simplest solution is to mask the sign bit when computing a FloatHash. Another
option is to treat -0 as a special case, and return the hash value for 0.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list