Commit 4f2009eb authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Fix finalization of incremental marking race.

Between requesting finalization of incremental marking and the time where we handle the request in the stack guard, the current full GC may have finished. In that case the stack guard triggers to late and tries to finalize marking in a state where marking is not going on.

Note that a cleaner fix would be to express the finalization phase in a special marking phase. I will do that in a follow-up CL.

BUG=

Review URL: https://codereview.chromium.org/1493133003

Cr-Commit-Position: refs/heads/master@{#32552}
parent e0a661fc
......@@ -764,7 +764,8 @@ void Heap::HandleGCRequest() {
return;
}
DCHECK(FLAG_finalize_marking_incrementally);
if (!incremental_marking()->finalize_marking_completed()) {
if (incremental_marking()->IsMarking() &&
!incremental_marking()->finalize_marking_completed()) {
FinalizeIncrementalMarking("GC interrupt: finalize incremental marking");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment