Bug 133661 - Global HashTables contain references to atomic StringImpls
Summary: Global HashTables contain references to atomic StringImpls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords: InRadar
Depends on:
Blocks: 133687
  Show dependency treegraph
 
Reported: 2014-06-09 15:38 PDT by Mark Hahnenberg
Modified: 2014-06-10 11:33 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.10 KB, patch)
2014-06-09 16:03 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch for landing (4.09 KB, patch)
2014-06-09 19:00 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2014-06-09 15:38:34 PDT
This was a long-standing bug revealed by bug 133558. The issue is that the global static HashTables cache their set of keys as StringImpls that are associated with a particular VM.  This is obviously incompatible with using multiple VMs on multiple threads (e.g. when using workers). The fix is to change the "keys" field of the static HashTables to be char** instead of StringImpl**.
Comment 1 Mark Hahnenberg 2014-06-09 16:03:26 PDT
Created attachment 232743 [details]
Patch
Comment 2 Geoffrey Garen 2014-06-09 16:07:53 PDT
Comment on attachment 232743 [details]
Patch

r=me
Comment 3 Ryosuke Niwa 2014-06-09 19:00:26 PDT
Created attachment 232760 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2014-06-09 20:02:17 PDT
Comment on attachment 232760 [details]
Patch for landing

Clearing flags on attachment: 232760

Committed r169740: <http://trac.webkit.org/changeset/169740>
Comment 5 WebKit Commit Bot 2014-06-09 20:02:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Alexey Proskuryakov 2014-06-10 09:52:57 PDT
> This is obviously incompatible with using multiple VMs on multiple threads (e.g. when using workers)

Wasn't this the case that "NoStaticTables" attribute handled? And if so, do we still need it after this patch, or can we remove it from everywhere?
Comment 7 Daniel Bates 2014-06-10 10:07:34 PDT
<rdar://problem/17249454>
Comment 8 Alexey Proskuryakov 2014-06-10 11:33:38 PDT
Mark filed bug 133687 to look into whether we still need NoStaticTables.