Bug 133661

Summary: Global HashTables contain references to atomic StringImpls
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, dbates, ggaren
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 133687    
Attachments:
Description Flags
Patch
none
Patch for landing none

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.