<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26334</bug_id>
          
          <creation_ts>2009-06-11 15:39:30 -0700</creation_ts>
          <short_desc>WTF::FloatHash is invalid for 0 / -0</short_desc>
          <delta_ts>2022-07-21 13:21:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>98627</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>mjs</cc>
    
    <cc>rniwa</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>125388</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2009-06-11 15:39:30 -0700</bug_when>
    <thetext>Because FloatHash does a bitwise hash, 0 and -0 get different hash values, even though they compare equal. That&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885777</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-21 13:18:34 -0700</bug_when>
    <thetext>I think it got fixed in following commit:

https://github.com/WebKit/WebKit/commit/cf04259b238524f34209400f7fc0962b7473f03f

I think this can be marked as RESOLVED INVALID or RESOLVED CONFIGURATION CHANGED. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885778</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-07-21 13:21:48 -0700</bug_when>
    <thetext>Seems like it indeed.

*** This bug has been marked as a duplicate of bug 98627 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>