From 09e7c01b3139c1fa4ea45995a3b7b4a46b348efd Mon Sep 17 00:00:00 2001 From: mlippautz Date: Wed, 10 Aug 2016 08:57:45 -0700 Subject: [PATCH] [heap] Fix LAB tests Let's not write out of bounds here. R=hpayer@chromium.org BUG=chromium:636331 Review-Url: https://codereview.chromium.org/2237473002 Cr-Commit-Position: refs/heads/master@{#38547} --- test/cctest/heap/test-lab.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cctest/heap/test-lab.cc b/test/cctest/heap/test-lab.cc index bf4d3cc999..5a0ff2fbc4 100644 --- a/test/cctest/heap/test-lab.cc +++ b/test/cctest/heap/test-lab.cc @@ -170,7 +170,7 @@ TEST(MergeSuccessful) { CcTest::InitializeVM(); Heap* heap = CcTest::heap(); const int kLabSize = 2 * KB; - Address base1 = AllocateLabBackingStore(heap, kLabSize); + Address base1 = AllocateLabBackingStore(heap, 2 * kLabSize); Address limit1 = base1 + kLabSize; Address base2 = limit1; Address limit2 = base2 + kLabSize; @@ -226,7 +226,7 @@ TEST(MergeFailed) { CcTest::InitializeVM(); Heap* heap = CcTest::heap(); const int kLabSize = 2 * KB; - Address base1 = AllocateLabBackingStore(heap, kLabSize); + Address base1 = AllocateLabBackingStore(heap, 3 * kLabSize); Address base2 = base1 + kLabSize; Address base3 = base2 + kLabSize;