WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138549
Remove BloomFilter size limit
https://bugs.webkit.org/show_bug.cgi?id=138549
Summary
Remove BloomFilter size limit
Antti Koivisto
Reported
2014-11-09 14:50:47 PST
It works fine with sizes greater than 2^16.
Attachments
patch
(1.15 KB, patch)
2014-11-09 14:53 PST
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2014-11-09 14:53:46 PST
Created
attachment 241261
[details]
patch
Chris Dumez
Comment 2
2014-11-09 15:18:46 PST
Comment on
attachment 241261
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241261&action=review
> Source/WTF/wtf/BloomFilter.h:-40 > - static_assert(keyBits <= 16, "BloomFilter key size must be less than or equal to 16!");
Shouldn't we make sure it is at least <= 32 so that 1 << keyBits below doesn't overflow? I have looked carefully at the implementation but was this 16 value somehow corrected to the 16 value used in secondSlot() below?
Chris Dumez
Comment 3
2014-11-09 15:26:40 PST
(In reply to
comment #2
)
> Comment on
attachment 241261
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=241261&action=review
> > > Source/WTF/wtf/BloomFilter.h:-40 > > - static_assert(keyBits <= 16, "BloomFilter key size must be less than or equal to 16!"); > > Shouldn't we make sure it is at least <= 32 so that 1 << keyBits below > doesn't overflow? > > I have looked carefully at the implementation but was this 16 value somehow > corrected to the 16 value used in secondSlot() below?
typo: s/corrected/connected
Antti Koivisto
Comment 4
2014-11-09 15:38:20 PST
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.
Andreas Kling
Comment 5
2014-11-10 08:59:16 PST
Comment on
attachment 241261
[details]
patch Sure, r=me
Ahmad Saleem
Comment 6
2022-10-10 09:49:53 PDT
Landed -
https://github.com/WebKit/WebKit/commit/c728c9b09cebb25ccf8b6d7906be1ccb334ac4e2
and didn't backed out. Marking "RESOLVED FIXED".
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug