Commit b3e26254 authored by Anton Bikineev's avatar Anton Bikineev Committed by Commit Bot

cppgc: Make sure pages returned to OS are unpoisoned

Otherwice, accesses in subsequent allocations may fail.

Bug: chromium:1101152
Change-Id: Ie8bd87e3ef68b532c8fa6ef85f757c930cbe35fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300485Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68883}
parent 339ca5bb
......@@ -5,6 +5,7 @@
#include "src/heap/cppgc/page-memory.h"
#include "src/base/macros.h"
#include "src/heap/cppgc/sanitizers.h"
namespace cppgc {
namespace internal {
......@@ -60,6 +61,8 @@ MemoryRegion ReserveMemoryRegion(PageAllocator* allocator,
void FreeMemoryRegion(PageAllocator* allocator,
const MemoryRegion& reserved_region) {
// Make sure pages returned to OS are unpoisoned.
ASAN_UNPOISON_MEMORY_REGION(reserved_region.base(), reserved_region.size());
allocator->FreePages(reserved_region.base(), reserved_region.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