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

[heap] Fix clearing of invalidated objects during Mark-Compact

CompactionSpace::SweepAndRetryAllocation was sweeping the space
without clearing invalidated objects. CompactionSpace is only used
during collections, mark-compact needs invalidated objects in
swept memory to be removed.

Bug: chromium:1020981
Change-Id: Ib5b0edcdd841257cf66af6de8b6a3bf785e5c813
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900452Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64798}
parent 732fd6cd
......@@ -3713,7 +3713,8 @@ bool CompactionSpace::SweepAndRetryAllocation(int size_in_bytes,
AllocationOrigin origin) {
MarkCompactCollector* collector = heap()->mark_compact_collector();
if (FLAG_concurrent_sweeping && collector->sweeping_in_progress()) {
collector->sweeper()->ParallelSweepSpace(identity(), 0);
collector->sweeper()->ParallelSweepSpace(
identity(), 0, 0, Sweeper::FreeSpaceMayContainInvalidatedSlots::kYes);
RefillFreeList();
return RefillLinearAllocationAreaFromFreeList(size_in_bytes, origin);
}
......@@ -3824,7 +3825,7 @@ bool PagedSpace::RawSlowRefillLinearAllocationArea(int size_in_bytes,
}
// If sweeper threads are active, wait for them at that point and steal
// elements form their free-lists. Allocation may still fail their which
// elements from their free-lists. Allocation may still fail their which
// would indicate that there is not enough memory for the given allocation.
return SweepAndRetryAllocation(size_in_bytes, origin);
}
......
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