Commit 11f576d1 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

Revert "[heap] Verify that newly allocated MemoryChunks are pre-initialzed with 0."

This reverts commit 77aba17a.

Reason for revert: broke gc stress bot
https://ci.chromium.org/buildbot/client.v8/V8%20Mac64%20GC%20Stress/743

Original change's description:
> [heap] Verify that newly allocated MemoryChunks are pre-initialzed with 0.
> 
> Bug: chromium:829771
> Change-Id: I78eab59fded3f41c93ecb3d5d8a30e1bddc4576e
> Reviewed-on: https://chromium-review.googlesource.com/1039747
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52925}

TBR=hpayer@chromium.org,mlippautz@chromium.org

Change-Id: I3053cb9d052e520dd6a41f54a6c7e1654fa4d1f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:829771
Reviewed-on: https://chromium-review.googlesource.com/1041245Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52927}
parent 4e668f8e
......@@ -883,9 +883,6 @@ MemoryChunk* MemoryAllocator::AllocateChunk(size_t reserve_area_size,
size_executable_.Increment(reservation.size());
}
VerifyCleared(base, CodePageGuardStartOffset());
VerifyCleared(base + CodePageAreaStartOffset(), commit_area_size);
if (Heap::ShouldZapGarbage()) {
ZapBlock(base, CodePageGuardStartOffset());
ZapBlock(base + CodePageAreaStartOffset(), commit_area_size);
......@@ -905,8 +902,6 @@ MemoryChunk* MemoryAllocator::AllocateChunk(size_t reserve_area_size,
if (base == kNullAddress) return nullptr;
VerifyCleared(base, Page::kObjectStartOffset + commit_area_size);
if (Heap::ShouldZapGarbage()) {
ZapBlock(base, Page::kObjectStartOffset + commit_area_size);
}
......@@ -1221,14 +1216,6 @@ void MemoryAllocator::ZapBlock(Address start, size_t size) {
}
}
void MemoryAllocator::VerifyCleared(Address start, size_t size) {
#ifdef VERIFY_HEAP
for (size_t i = 0; i < size / kPointerSize; i++) {
CHECK_EQ(reinterpret_cast<uintptr_t*>(start)[i], kClearedFreeMemoryValue);
}
#endif // VERIFY_HEAP
}
size_t MemoryAllocator::CodePageGuardStartOffset() {
// We are guarding code pages: the first OS page after the header
// will be protected as non-writable.
......
......@@ -1393,9 +1393,6 @@ class V8_EXPORT_PRIVATE MemoryAllocator {
// filling it up with a recognizable non-nullptr bit pattern.
void ZapBlock(Address start, size_t size);
// Checks if the memory [start..(start+size)[ is initialized with 0.
void VerifyCleared(Address start, size_t size);
V8_WARN_UNUSED_RESULT bool CommitExecutableMemory(VirtualMemory* vm,
Address start,
size_t commit_size,
......
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