Last Comment Bug 744489 - Fix incremental GC assertion in ValidateIncrementalMarking
: Fix incremental GC assertion in ValidateIncrementalMarking
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: [PTO to Dec5] Bill McCloskey (:billm)
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-11 11:07 PDT by [PTO to Dec5] Bill McCloskey (:billm)
Modified: 2012-04-13 04:25 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.75 KB, patch)
2012-04-11 11:07 PDT, [PTO to Dec5] Bill McCloskey (:billm)
igor: review+
Details | Diff | Splinter Review

Description [PTO to Dec5] Bill McCloskey (:billm) 2012-04-11 11:07:59 PDT
Created attachment 614066 [details] [diff] [review]
patch

I was a little overzealous in bug 739899 when I tried to remove all full GC flags. As a consequence, the following can now happen:

1. Start an incremental GC with all compartments being collected. Therefore, the atoms compartment can be collected.
2. A new compartment is created
3. When the GC is finished, call ValidateIncrementalMarking.
4. It calls MarkRuntime again. This time, since the new compartment is not being collected, we mark all atoms.
5. ValidateIncrementalMarking asserts because the incremental GC didn't mark all the atoms, while the non-incremental one did.

This is a bogus assertion. We're not required to mark all atoms in this situation. Any atoms pointed to by the new compartment either existed before or else they were new, and we'll mark them either way.

The patch just adds a "full GC" flag that is set at the beginning of the incremental GC and used by both calls to MarkRuntime.
Comment 1 [PTO to Dec5] Bill McCloskey (:billm) 2012-04-12 11:16:55 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/ae32cca25ce0
Comment 2 Marco Bonardo [::mak] 2012-04-13 04:25:57 PDT
https://hg.mozilla.org/mozilla-central/rev/ae32cca25ce0

Note You need to log in before you can comment on or make changes to this bug.