[heap] Fix failure in VerifyNewSpaceTop with PublishPendingAllocation

VerifyNewSpaceTop() assumes that original_top_ and
allocation_info_.start() always match. PublishPendingAllocations()
violates this invariant by only updating original_top_ in the NewSpace.
Fix this by using MarkLabStartInitialized() for NewSpace.

Alternatively we could loosen the DCHECK in VerifyNewSpaceTop(). The fix
doesn't matter too much since Ulan's LAB refactoring will get rid of
that code anyways.

Bug: v8:11224
Change-Id: I26267ac9dd78cc5d2a2a6fefca3b69f4582c094f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2569769
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71618}
This commit is contained in:
Dominik Inführ 2020-12-03 09:12:16 +01:00 committed by Commit Bot
parent 18138f2630
commit 9d912d32d0

View File

@ -938,7 +938,7 @@ void Heap::RemoveAllocationObserversFromAllSpaces(
}
void Heap::PublishPendingAllocations() {
new_space_->MoveOriginalTopForward();
new_space_->MarkLabStartInitialized();
PagedSpaceIterator spaces(this);
for (PagedSpace* space = spaces.Next(); space != nullptr;
space = spaces.Next()) {