[Webkit-unassigned] [Bug 167288] New: IntlObject uses JSArray::tryCreateUninitialized in an unsafe way

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 21 22:29:17 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167288

            Bug ID: 167288
           Summary: IntlObject uses JSArray::tryCreateUninitialized in an
                    unsafe way
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: msaboff at apple.com

IntlObject.cpp uses JSArray::tryCreateUninitialized() in three locations in a unsafe way.  If the caller of tryCreateUninitialized allocates object when initializing the array contents, it needs to have an active GCDeferralContext.  This is responsible for a GC related crash in LayoutTests/js/intl.html, see attached crash dump.

It really isn’t appropriate for IntlObject to be using tryCreateUninitialized() as it is intended for performance sensitive Array allocation sites.  The appropriate fix is to provide a JSArray::tryCreate() method for code like IntlObject to use.

<rdar://problem/30134434>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170122/d5ca7b8a/attachment-0001.html>


More information about the webkit-unassigned mailing list