[Webkit-unassigned] [Bug 173720] New: initializeThreading() [first] causes WTFCrash due to maxSingleAllocationSize not being initialized

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 22 09:38:52 PDT 2017


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

            Bug ID: 173720
           Summary: initializeThreading() [first] causes WTFCrash due to
                    maxSingleAllocationSize not being initialized
           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: vladimir at pobox.com

This is probably an edge case, but -- in a JSC static build that gets linked into another DLL, and that DLL does some dumb stuff from static constructors, such as JSClassCreate, I get this crash because maxSingleAllocationSize is still 0 (it's set by Options::initialize() which hasn't been called yet by initializeThreading()) -- lambdas and other junk omitted from stack:

WTFCrash()
WTF::fastMalloc(unsigned __int64 n)
WTF::Lock::operator new(unsigned __int64 size)
std::make_unique<WTF::Lock>()
WTF::threadMap()
WTF::ThreadHolder::initializeOnce()
WTF::initializeThreading()
JSC::initializeThreading::__l2::<lambda>()
JSC::initializeThreading()
JSClassCreate(const JSClassDefinition * definition)
...

I don't know if this is valid (to do stuff like JSClassCreate from constructors without doing explicit engine initialization), but it worked on older versions of jscore.

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


More information about the webkit-unassigned mailing list