RESOLVED FIXED 125472
ASSERT !heap.vm()->isInitializingObject() when finishing DFG compilation at beginning of GC
https://bugs.webkit.org/show_bug.cgi?id=125472
Summary ASSERT !heap.vm()->isInitializingObject() when finishing DFG compilation at b...
Mark Hahnenberg
Reported 2013-12-09 16:00:10 PST
We already assume that we might do some allocation during DFG plan finalization, so we just need to flip the proper bits so that the ASSERT doesn't fire in this situation.
Attachments
Patch (9.24 KB, patch)
2013-12-09 16:44 PST, Mark Hahnenberg
no flags
Patch (11.77 KB, patch)
2013-12-09 18:45 PST, Mark Hahnenberg
ggaren: review+
eflews.bot: commit-queue-
Mark Hahnenberg
Comment 1 2013-12-09 16:44:34 PST
EFL EWS Bot
Comment 2 2013-12-09 16:52:10 PST
EFL EWS Bot
Comment 3 2013-12-09 16:59:00 PST
Build Bot
Comment 4 2013-12-09 17:16:59 PST
Build Bot
Comment 5 2013-12-09 17:28:02 PST
Build Bot
Comment 6 2013-12-09 17:28:24 PST
Mark Hahnenberg
Comment 7 2013-12-09 18:45:22 PST
EFL EWS Bot
Comment 8 2013-12-09 20:45:23 PST
Geoffrey Garen
Comment 9 2013-12-09 21:18:56 PST
Comment on attachment 218819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218819&action=review r=me > Source/JavaScriptCore/heap/Heap.cpp:759 > + PretendAllocationOkay pretend(*this); I don't like the word "pretend" here because it implies that we're only silencing ASSERTs, when in reality we're making material changes that make the difference between allocating being OK or not. How about "RecursiveAllocationScope"? > Source/JavaScriptCore/heap/Heap.cpp:760 > + m_vm->prepareToDiscardCode(); Do we need to do this in every GC, or only if we're going to discard code? Seems weird, and unnecessarily costly, to do this if we're not going to discard code.
Mark Hahnenberg
Comment 10 2013-12-10 08:25:45 PST
Comment on attachment 218819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218819&action=review >> Source/JavaScriptCore/heap/Heap.cpp:759 >> + PretendAllocationOkay pretend(*this); > > I don't like the word "pretend" here because it implies that we're only silencing ASSERTs, when in reality we're making material changes that make the difference between allocating being OK or not. How about "RecursiveAllocationScope"? OK. >> Source/JavaScriptCore/heap/Heap.cpp:760 >> + m_vm->prepareToDiscardCode(); > > Do we need to do this in every GC, or only if we're going to discard code? Seems weird, and unnecessarily costly, to do this if we're not going to discard code. I think this is an unfortunately named method. We have an invariant right now that there can be no concurrent compilation going on during garbage collection, which is what "prepareToDiscardCode()" enforces, i.e. it finishes any remaining compilation work which then prevents any further concurrent compilation. I don't think this invariant is only related to discarding code. There are lots of assumptions in how concurrent compilation works that are built on top of the fact that a GC absolutely cannot occur in the middle of a compilation. For example, I believe LUB-ing of value profiles, array profiles, etc. depend on the fact that the object they grab from the profile is not a stale reference to a dead object.
Mark Hahnenberg
Comment 11 2013-12-10 11:34:31 PST
Note You need to log in before you can comment on or make changes to this bug.