From 00a77a9f4aeed0a2dd7124e564991e59a9f393c6 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 5 Dec 2017 03:32:06 -0800 Subject: [PATCH] [heap] Fix top_on_previous_step_ check in NewSpace::AllocateRaw. See also: https://chromium-review.googlesource.com/c/v8/v8/+/738204 BUG=chromium:791582 Change-Id: Ife3acf35eeaa6fdebd5ea2fabc1678ec762b3ed3 Reviewed-on: https://chromium-review.googlesource.com/806516 Reviewed-by: Ulan Degenbaev Commit-Queue: Ali Ijaz Sheikh Cr-Commit-Position: refs/heads/master@{#49873} --- src/heap/spaces-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h index 176e3c4dc7..ce695b0175 100644 --- a/src/heap/spaces-inl.h +++ b/src/heap/spaces-inl.h @@ -464,8 +464,8 @@ AllocationResult NewSpace::AllocateRaw(int size_in_bytes, AllocationAlignment alignment) { if (top() < top_on_previous_step_) { // Generated code decreased the top() pointer to do folded allocations - DCHECK_EQ(Page::FromAddress(top()), - Page::FromAddress(top_on_previous_step_)); + DCHECK_EQ(Page::FromAllocationAreaAddress(top()), + Page::FromAllocationAreaAddress(top_on_previous_step_)); top_on_previous_step_ = top(); } #ifdef V8_HOST_ARCH_32_BIT