Commit 361e24bc authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

[heap] Revise memento check

Explicitly check that the memento is not in the unallocated portion of
the current LAB.

Bug: v8:12612
Change-Id: Ie060f44187d2280e72e2eebb0f3c284e2d6c7446
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824337
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82396}
parent a137ba54
......@@ -393,9 +393,8 @@ AllocationMemento Heap::FindAllocationMemento(Map map, HeapObject object) {
// another object of at least word size (the header map word) following
// it, so suffices to compare ptr and top here.
top = NewSpaceTop();
DCHECK(memento_address == top ||
memento_address + HeapObject::kHeaderSize <= top ||
!Page::OnSamePage(memento_address, top - 1));
DCHECK(memento_address >= new_space()->limit() ||
memento_address + HeapObject::kHeaderSize <= top);
if ((memento_address != top) && memento_candidate.IsValid()) {
return memento_candidate;
}
......
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