<?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>138549</bug_id>
          
          <creation_ts>2014-11-09 14:50:47 -0800</creation_ts>
          <short_desc>Remove BloomFilter size limit</short_desc>
          <delta_ts>2022-10-10 09:49:53 -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>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>benjamin</cc>
    
    <cc>cdumez</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1047413</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-11-09 14:50:47 -0800</bug_when>
    <thetext>It works fine with sizes greater than 2^16.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047416</commentid>
    <comment_count>1</comment_count>
      <attachid>241261</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-11-09 14:53:46 -0800</bug_when>
    <thetext>Created attachment 241261
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047419</commentid>
    <comment_count>2</comment_count>
      <attachid>241261</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2014-11-09 15:18:46 -0800</bug_when>
    <thetext>Comment on attachment 241261
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241261&amp;action=review

&gt; Source/WTF/wtf/BloomFilter.h:-40
&gt; -    static_assert(keyBits &lt;= 16, &quot;BloomFilter key size must be less than or equal to 16!&quot;);

Shouldn&apos;t we make sure it is at least &lt;= 32 so that 1 &lt;&lt; keyBits below doesn&apos;t overflow?

I have looked carefully at the implementation but was this 16 value somehow corrected to the 16 value used in secondSlot() below?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047420</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2014-11-09 15:26:40 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 241261 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=241261&amp;action=review
&gt; 
&gt; &gt; Source/WTF/wtf/BloomFilter.h:-40
&gt; &gt; -    static_assert(keyBits &lt;= 16, &quot;BloomFilter key size must be less than or equal to 16!&quot;);
&gt; 
&gt; Shouldn&apos;t we make sure it is at least &lt;= 32 so that 1 &lt;&lt; keyBits below
&gt; doesn&apos;t overflow?
&gt; 
&gt; I have looked carefully at the implementation but was this 16 value somehow
&gt; corrected to the 16 value used in secondSlot() below?

typo: s/corrected/connected</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047424</commentid>
    <comment_count>4</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2014-11-09 15:38:20 -0800</bug_when>
    <thetext>I just removed the assert as it is unlikely anyone would try to create anything close to a 4GB filter.

I think we get sensible slot spread without any code changes. It is not entirely symmetric anymore, first slot uses the entire table while second is the lowest 2^16 slots. However there are only 16 unique bits per slot in the key anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047542</commentid>
    <comment_count>5</comment_count>
      <attachid>241261</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2014-11-10 08:59:16 -0800</bug_when>
    <thetext>Comment on attachment 241261
patch

Sure, r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904515</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-10 09:49:53 -0700</bug_when>
    <thetext>Landed - https://github.com/WebKit/WebKit/commit/c728c9b09cebb25ccf8b6d7906be1ccb334ac4e2

and didn&apos;t backed out. Marking &quot;RESOLVED FIXED&quot;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>241261</attachid>
            <date>2014-11-09 14:53:46 -0800</date>
            <delta_ts>2014-11-10 08:59:16 -0800</delta_ts>
            <desc>patch</desc>
            <filename>bloom-filter-size.patch</filename>
            <type>text/plain</type>
            <size>1176</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxNzU3OTUpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDEyIEBACisyMDE0LTExLTA5ICBBbnR0aSBLb2l2aXN0byAgPGFu
dHRpQGFwcGxlLmNvbT4KKworICAgICAgICBSZW1vdmUgQmxvb21GaWx0ZXIgc2l6ZSBsaW1pdAor
ICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTM4NTQ5CisK
KyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgKiB3dGYvQmxv
b21GaWx0ZXIuaDogUmVtb3ZlIHRoZSBzdGF0aWNfYXNzZXJ0LCB0aGUgY29kZSB3b3JrcyBmaW5l
IHdpdGggbGFyZ2VyIHNpemVzLgorCiAyMDE0LTExLTA4ICBEYXJpbiBBZGxlciAgPGRhcmluQGFw
cGxlLmNvbT4KIAogICAgICAgICBSZXBsYWNlIEZpbGVUaHJlYWQgY2xhc3Mgd2l0aCBhIHNpbmds
ZSBmdW5jdGlvbgpJbmRleDogU291cmNlL1dURi93dGYvQmxvb21GaWx0ZXIuaAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
Ci0tLSBTb3VyY2UvV1RGL3d0Zi9CbG9vbUZpbHRlci5oCShyZXZpc2lvbiAxNzU3NDYpCisrKyBT
b3VyY2UvV1RGL3d0Zi9CbG9vbUZpbHRlci5oCSh3b3JraW5nIGNvcHkpCkBAIC0zNyw4ICszNyw2
IEBAIHRlbXBsYXRlIDx1bnNpZ25lZCBrZXlCaXRzPgogY2xhc3MgQmxvb21GaWx0ZXIgewogICAg
IFdURl9NQUtFX0ZBU1RfQUxMT0NBVEVEOwogcHVibGljOgotICAgIHN0YXRpY19hc3NlcnQoa2V5
Qml0cyA8PSAxNiwgIkJsb29tRmlsdGVyIGtleSBzaXplIG11c3QgYmUgbGVzcyB0aGFuIG9yIGVx
dWFsIHRvIDE2ISIpOwotCiAgICAgc3RhdGljIGNvbnN0IHNpemVfdCB0YWJsZVNpemUgPSAxIDw8
IGtleUJpdHM7CiAgICAgc3RhdGljIGNvbnN0IHVuc2lnbmVkIGtleU1hc2sgPSAoMSA8PCBrZXlC
aXRzKSAtIDE7CiAgICAgc3RhdGljIHVpbnQ4X3QgbWF4aW11bUNvdW50KCkgeyByZXR1cm4gc3Rk
OjpudW1lcmljX2xpbWl0czx1aW50OF90Pjo6bWF4KCk7IH0K
</data>
<flag name="review"
          id="266100"
          type_id="1"
          status="+"
          setter="kling"
    />
          </attachment>
      

    </bug>

</bugzilla>