Closed
Bug 1382435
Opened 8 years ago
Closed 8 years ago
jsid's inside ShapeTable with Symbols created from Symbol.for(foo) and with foo will cause hashtable collision
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
1.21 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
This is because the symbol will be created using the atom's hash, so if both a jsid with a JSAtom* with that hash inside it and a jsid with the symbol inside it get stored in the hash table, they are guaranteed to collide with each other.
https://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/js/src/vm/Symbol.cpp#79
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8888082 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•8 years ago
|
||
I don't think Speedometer actually hits this case, but I found this while looking at the hashing functions for jsid in the context of bug 1382097.
Blocks: 1382097
Comment 3•8 years ago
|
||
Comment on attachment 8888082 [details] [diff] [review]
Create Symbols from Symbol.for() with a different hash from the atom used to create them
Review of attachment 8888082 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch.
Attachment #8888082 -
Flags: review?(jdemooij) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd9640f4e733
Create Symbols from Symbol.for() with a different hash from the atom used to create them; r=jandem
![]() |
||
Comment 5•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•