Commit 44c6e9f6 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] EnsureSweepingCompleted needs to be run in safepoint

SimulateIncrementalMarking needs to invoke EnsureSweepingCompleted in
a safepoint. Otherwise RefillFreeList in this method races with
concurrent allocation.

Bug: v8:10315
Change-Id: I9aa11d225a1c1844648788f956fd72988fe269fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349299Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69336}
parent cdd984ef
......@@ -161,6 +161,7 @@ void SimulateIncrementalMarking(i::Heap* heap, bool force_completion) {
i::IncrementalMarking* marking = heap->incremental_marking();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
if (collector->sweeping_in_progress()) {
SafepointScope scope(heap);
collector->EnsureSweepingCompleted();
}
if (marking->IsSweeping()) {
......
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