gardening: Disable PartitionAllocPageAllocatorTest.DecommitAndZero on UBSan

Bug: 416151077
Change-Id: I5c312bf61fca43e94dc3201eaac2e47ec3abb425
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6515023
Reviewed-by: Kalvin Lee <kdlee@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Kalvin Lee <kdlee@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Owners-Override: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1456751}
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc
index c136658..5c5bc31 100644
--- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc
+++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc
@@ -561,7 +561,13 @@
   FreePages(buffer, size);
 }
 
-TEST(PartitionAllocPageAllocatorTest, DecommitAndZero) {
+// TODO(crbug.com/416151077): Enabled the test on UBSan.
+#if defined(UNDEFINED_SANITIZER)
+#define MAYBE_DecommitAndZero DISABLED_DecommitAndZero
+#else
+#define MAYBE_DecommitAndZero DecommitAndZero
+#endif
+TEST(PartitionAllocPageAllocatorTest, MAYBE_DecommitAndZero) {
   size_t size = PageAllocationGranularity();
   uintptr_t buffer = AllocPages(size, PageAllocationGranularity(),
                                 PageAccessibilityConfiguration(