Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 03be9035b917e76512ee43e64fb52b858705eaf1..aefab10cd1bc5fc7de9643c4b1c55ff4a027f1ba 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -594,6 +594,17 @@ LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk, |
FATAL("Code page is too large."); |
} |
heap->incremental_marking()->SetOldSpacePageFlags(chunk); |
+ |
+ MSAN_ALLOCATED_UNINITIALIZED_MEMORY(chunk->area_start(), chunk->area_size()); |
+ |
+ // Initialize the owner field for each contained page (except the first, which |
+ // is initialized by MemoryChunk::Initialize). |
+ for (Address addr = chunk->address() + Page::kPageSize + Page::kOwnerOffset; |
+ addr < chunk->area_end(); addr += Page::kPageSize) { |
+ // Clear out kPageHeaderTag. |
+ Memory::Address_at(addr) = 0; |
+ } |
+ |
return static_cast<LargePage*>(chunk); |
} |