From 2b496e3a9b3011a5ac095baea8c98ade4eed9844 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Mon, 13 May 2024 19:08:53 +0800 Subject: [PATCH] base/allocator: Revert stack scanning refactor It is still only used by starscan, which is not used by us. It causes hanging in pthread_getattr_np() under qemu-user, see https://www.openwall.com/lists/musl/2017/06/15/9. Introduced in https://chromium-review.googlesource.com/c/chromium/src/+/5371077 --- src/base/allocator/partition_alloc_support.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/allocator/partition_alloc_support.cc b/src/base/allocator/partition_alloc_support.cc index 4a07b5a252..1152c4ca97 100644 --- a/src/base/allocator/partition_alloc_support.cc +++ b/src/base/allocator/partition_alloc_support.cc @@ -1289,10 +1289,10 @@ void PartitionAllocSupport::ReconfigureAfterFeatureListInit( #endif // PA_BUILDFLAG(USE_STARSCAN) #if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if PA_BUILDFLAG(USE_STARSCAN) partition_alloc::internal::StackTopRegistry::Get().NotifyThreadCreated( partition_alloc::internal::GetStackTop()); -#if PA_BUILDFLAG(USE_STARSCAN) // Non-quarantinable partition is dealing with hot V8's zone allocations. // In case PCScan is enabled in Renderer, enable thread cache on this // partition. At the same time, thread cache on the main(malloc) partition