Commit 1d661ec3 authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

Mark the Virtual Memory Cage as compatible with LSAN

There is no need to wrap the cage's page allocator into a
LsanPageAllocator as that page allocator ultimately relies on the
platform page allocator to obtain pages. As the platform page allocator
will be a LsanPageAllocator when LSAN is enabled, it will already take
care of marking the pages as root regions with LSAN.

luci.v8.try:v8_linux64_heap_sandbox_dbg_ng

Bug: chromium:1218005
Change-Id: I62b5da9cb320e5012a657951c0d4c85a1bb2b3fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3222761Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77403}
parent 72cd8c1a
......@@ -485,8 +485,7 @@ if (build_with_chromium && v8_current_cpu == "arm64" &&
# Enable the virtual memory cage on 64-bit Chromium builds.
if (build_with_chromium && v8_enable_pointer_compression_shared_cage) {
# The cage is incompatible with lsan.
v8_enable_virtual_memory_cage = !is_lsan
v8_enable_virtual_memory_cage = true
}
assert(!v8_disable_write_barriers || v8_enable_single_generation,
......@@ -521,9 +520,6 @@ assert(
!v8_enable_virtual_memory_cage || v8_enable_pointer_compression_shared_cage,
"V8 VirtualMemoryCage requires the shared pointer compression cage")
assert(!v8_enable_virtual_memory_cage || !is_lsan,
"V8 VirtualMemoryCage is currently incompatible with Leak Sanitizer")
assert(
!v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression,
"Can't share a pointer compression cage if pointers aren't compressed")
......
......@@ -54,7 +54,6 @@ class PageAllocatorInitializer {
page_allocator_ = default_page_allocator.get();
}
#if defined(LEAK_SANITIZER)
static_assert(!V8_VIRTUAL_MEMORY_CAGE_BOOL, "Not currently supported");
static base::LeakyObject<base::LsanPageAllocator> lsan_allocator(
page_allocator_);
page_allocator_ = lsan_allocator.get();
......
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