Commit 402806e8 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[cppgc][unittests] Only expect guard pages support on 4k platforms.

Arm64 supports 16k and 64k OS pages, in which case the CPPGC doesn't use
guard pages.

Bug: v8:10808
Change-Id: I36efba687c50b348eda62e9f9094b57bd58b55b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2485494
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70664}
parent 958d8e9f
......@@ -117,9 +117,16 @@ TEST(PageMemoryRegionTest, PlatformUsesGuardPages) {
v8::base::PageAllocator allocator;
#if defined(V8_HOST_ARCH_PPC64) && !defined(_AIX)
EXPECT_FALSE(SupportsCommittingGuardPages(&allocator));
#else // !V8_HOST_ARCH_PPC64
#elif defined(V8_HOST_ARCH_ARM64)
if (allocator.CommitPageSize() == 4096) {
EXPECT_TRUE(SupportsCommittingGuardPages(&allocator));
} else {
// Arm64 supports both 16k and 64k OS pages.
EXPECT_FALSE(SupportsCommittingGuardPages(&allocator));
}
#else // Regular case.
EXPECT_TRUE(SupportsCommittingGuardPages(&allocator));
#endif // !V8_HOST_ARCH_PPC64
#endif
}
namespace {
......
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