Bug 194566 - Create a randomized free list for new StructureIDs on StructureIDTable resize.
Summary: Create a randomized free list for new StructureIDs on StructureIDTable resize.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-12 16:31 PST by Mark Lam
Modified: 2019-02-13 12:35 PST (History)
8 users (show)

See Also:


Attachments
proposed patch. (4.83 KB, patch)
2019-02-12 16:34 PST, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (7.69 KB, patch)
2019-02-12 22:55 PST, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2019-02-12 16:31:19 PST
<rdar://problem/47975502>
Comment 1 Mark Lam 2019-02-12 16:34:01 PST
Created attachment 361863 [details]
proposed patch.
Comment 2 Saam Barati 2019-02-12 20:50:16 PST
Comment on attachment 361863 [details]
proposed patch.

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

> Source/JavaScriptCore/runtime/StructureIDTable.cpp:71
> +                table()[pick].offset = m_firstFreeOffset;

Why not just assign to zero?
Comment 3 Mark Lam 2019-02-12 20:52:09 PST
Comment on attachment 361863 [details]
proposed patch.

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

>> Source/JavaScriptCore/runtime/StructureIDTable.cpp:71
>> +                table()[pick].offset = m_firstFreeOffset;
> 
> Why not just assign to zero?

Oops.  This is a bug.  It should be:
    table()[pick].offset = head;
Comment 4 Mark Lam 2019-02-12 20:53:24 PST
Looks like I should fix the 32-bit issues too.  Probably something trivial.
Comment 5 Mark Lam 2019-02-12 22:55:51 PST
Created attachment 361899 [details]
proposed patch.
Comment 6 Michael Saboff 2019-02-13 10:35:30 PST
Comment on attachment 361899 [details]
proposed patch.

r=me
Comment 7 Mark Lam 2019-02-13 12:33:23 PST
Thanks for the review.  I re-tested the fixed patch with the CLI JetStream2, and perf appears to be neutral.  Will land now.
Comment 8 Mark Lam 2019-02-13 12:35:06 PST
Landed in r241449: <http://trac.webkit.org/r241449>.