From 8cc7ce8a7b39b3dc47a5be3bbd74430f19a42af8 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 5 Aug 2023 23:35:21 +0800 Subject: [PATCH] allocator: Disable PartitionAlloc memory tagging on non-glibc Memory tagging depends on ifunc which is glibc-specific. --- .../allocator/partition_allocator/partition_alloc_config.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/allocator/partition_allocator/partition_alloc_config.h b/src/base/allocator/partition_allocator/partition_alloc_config.h index 7b6926505d5..2b8a2ffd540 100644 --- a/src/base/allocator/partition_allocator/partition_alloc_config.h +++ b/src/base/allocator/partition_allocator/partition_alloc_config.h @@ -150,9 +150,10 @@ static_assert(sizeof(void*) != 8, ""); (!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \ defined(ARCH_CPU_LITTLE_ENDIAN)) -#define PA_CONFIG_HAS_MEMORY_TAGGING() \ - (defined(ARCH_CPU_ARM64) && defined(__clang__) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) +#define PA_CONFIG_HAS_MEMORY_TAGGING() \ + (defined(ARCH_CPU_ARM64) && defined(__clang__) && \ + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) && \ + defined(LIBC_GLIBC) #if PA_CONFIG(HAS_MEMORY_TAGGING) static_assert(sizeof(void*) == 8);