Bug 226027 - The test of SmallSet.cpp should pass the right HashTrait to the HashSet it uses as a reference
Summary: The test of SmallSet.cpp should pass the right HashTrait to the HashSet it us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
: 225978 (view as bug list)
Depends on: 225848
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-20 10:29 PDT by Robin Morisset
Modified: 2021-05-20 12:34 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.34 KB, patch)
2021-05-20 10:31 PDT, Robin Morisset
mark.lam: review+
mark.lam: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (1.58 KB, patch)
2021-05-20 12:09 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2021-05-20 10:29:40 PDT
SmallSet allows all values except for the max value.
So we test it on small values, including 0.

HashSet by default forbids 0, so it made the test crash.
We can trivially fix it by passing UnsignedWithZeroKeyHashTraits, which allows everything which is not max() or max()-1
Comment 1 Robin Morisset 2021-05-20 10:31:22 PDT
Created attachment 429185 [details]
Patch
Comment 2 Robin Morisset 2021-05-20 10:32:28 PDT
rdar://78217299
Comment 3 Robin Morisset 2021-05-20 10:35:07 PDT
*** Bug 225978 has been marked as a duplicate of this bug. ***
Comment 4 Mark Lam 2021-05-20 11:33:28 PDT
Comment on attachment 429185 [details]
Patch

r=me
Comment 5 Mark Lam 2021-05-20 11:34:58 PDT
(In reply to Robin Morisset from comment #0)
> SmallSet allows all values except for the max value.
> So we test it on small values, including 0.
> 
> HashSet by default forbids 0, so it made the test crash.
> We can trivially fix it by passing UnsignedWithZeroKeyHashTraits, which
> allows everything which is not max() or max()-1

You should put this explanation in the ChangeLog.
Comment 6 Robin Morisset 2021-05-20 12:09:51 PDT
Created attachment 429202 [details]
Patch for landing
Comment 7 EWS 2021-05-20 12:34:40 PDT
Committed r277817 (237964@main): <https://commits.webkit.org/237964@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429202 [details].