the pvalloc/valloc symbols are obsolete and not implemented in musl -- --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc @@ -410,7 +410,7 @@ ASSERT_GE(aligned_allocs_intercepted_by_alignment[128], 1u); ASSERT_GE(aligned_allocs_intercepted_by_size[53], 1u); -#if PA_BUILDFLAG(IS_POSIX) && !PA_BUILDFLAG(IS_ANDROID) +#if (PA_BUILDFLAG(IS_POSIX) && defined(__GLIBC__)) && !PA_BUILDFLAG(IS_ANDROID) void* pvalloc_ptr = pvalloc(67); ASSERT_NE(nullptr, pvalloc_ptr); ASSERT_EQ(0u, reinterpret_cast(pvalloc_ptr) % kPageSize); @@ -449,7 +449,7 @@ free(memalign_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u); -#if PA_BUILDFLAG(IS_POSIX) && !PA_BUILDFLAG(IS_ANDROID) +#if (PA_BUILDFLAG(IS_POSIX) && defined(__GLIBC__)) && !PA_BUILDFLAG(IS_ANDROID) free(pvalloc_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u); #endif // PA_BUILDFLAG(IS_POSIX) && !PA_BUILDFLAG(IS_ANDROID) --- a/base/process/memory_unittest.cc +++ b/base/process/memory_unittest.cc @@ -359,7 +359,7 @@ #endif // BUILDFLAG(IS_WIN) #endif // !BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) TEST_F(OutOfMemoryDeathTest, Valloc) { ASSERT_OOM_DEATH({