0

[PA] Fix compile failure in PartitionRoot::CheckMetadataIntegrity

This should fix the compile error which triggered tree closure.
https://ci.chromium.org/ui/p/chromium/builders/ci/ios-device/415904/overview

Bug: 371135823, 346464587
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I0d6d03dd021df6289bf22a9136866175384eac0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6390216
Commit-Queue: Mikihito Matsuura <mikt@google.com>
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Cr-Commit-Position: refs/heads/main@{#1437318}
This commit is contained in:
mikt
2025-03-24 23:18:10 -07:00
committed by Chromium LUCI CQ
parent 8f592e4351
commit 56390fdc30

@ -2039,6 +2039,8 @@ void PartitionRoot::CheckMetadataIntegrity(const void* ptr) {
ReadOnlySlotSpanMetadata::FromAddr(address);
PA_CHECK(PartitionRoot::FromSlotSpanMetadata(slot_span) == root);
#if PA_BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) || \
PA_BUILDFLAG(USE_PARTITION_COOKIE)
uintptr_t slot_span_start =
ReadOnlySlotSpanMetadata::ToSlotSpanStart(slot_span);
size_t offset_in_slot_span = address - slot_span_start;
@ -2047,6 +2049,8 @@ void PartitionRoot::CheckMetadataIntegrity(const void* ptr) {
uintptr_t untagged_slot_start =
slot_span_start +
bucket->slot_size * bucket->GetSlotNumber(offset_in_slot_span);
#endif // PA_BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) ||
// PA_BUILDFLAG(USE_PARTITION_COOKIE)
#if PA_BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT)
if (root->brp_enabled()) {