Bug 125789 - CStack Branch: REGRESSION(r160600) ASSERT failure in Heap::collect()
Summary: CStack Branch: REGRESSION(r160600) ASSERT failure in Heap::collect()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 11:00 PST by Michael Saboff
Modified: 2013-12-16 13:20 PST (History)
0 users

See Also:


Attachments
Patch (1.28 KB, patch)
2013-12-16 11:04 PST, Michael Saboff
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2013-12-16 11:00:20 PST
ASSERTION FAILED: vm()->currentThreadIsHoldingAPILock()
/Volumes/Data/src/webkit.cstack/Source/JavaScriptCore/heap/Heap.cpp(755) : void JSC::Heap::collect(JSC::Heap::SweepToggle)
1   0x1006c5700 WTFCrash
2   0x10034fdf2 JSC::Heap::collect(JSC::Heap::SweepToggle)
3   0x10034e694 JSC::Heap::collectIfNecessaryOrDefer()
4   0x10012467f JSC::CopiedSpace::allocateBlock()
5   0x1001230ef JSC::CopiedSpace::init()
6   0x10034e209 JSC::Heap::Heap(JSC::VM*, JSC::HeapType)
7   0x10034df63 JSC::Heap::Heap(JSC::VM*, JSC::HeapType)
8   0x100666033 JSC::VM::VM(JSC::VM::VMType, JSC::HeapType)
9   0x100665f31 JSC::VM::VM(JSC::VM::VMType, JSC::HeapType)
10  0x100668a2e JSC::VM::create(JSC::HeapType)
11  0x100001993 jscmain(int, char**)
12  0x1000018b6 main
13  0x7fff93a6e5fd start
14  0x2

We don't have the API lock because we are still initializing the VM.  We should try collecting since we haven't allocated anything.  I think we need to put the shouldCollect() check back in collectIfNecessaryOrDefer().
Comment 1 Michael Saboff 2013-12-16 11:04:37 PST
Created attachment 219333 [details]
Patch
Comment 2 Mark Lam 2013-12-16 12:56:14 PST
Comment on attachment 219333 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:8
> +        Restored the chouldCollect() check so we don't collect on start up.

typo: chouldCollect() ==> shouldCollect().
Comment 3 Geoffrey Garen 2013-12-16 13:08:56 PST
Comment on attachment 219333 [details]
Patch

r=me
Comment 4 Michael Saboff 2013-12-16 13:20:53 PST
Committed r160658: <http://trac.webkit.org/changeset/160658>