Skip to content

Commit

Permalink
base/allocator: Revert stack scanning refactor
Browse files Browse the repository at this point in the history
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
  • Loading branch information
klzgrad committed May 13, 2024
1 parent 8b454ee commit 0edc025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/allocator/partition_alloc_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1245,10 +1245,10 @@ void PartitionAllocSupport::ReconfigureAfterFeatureListInit(
#endif // BUILDFLAG(USE_STARSCAN)

#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
#if BUILDFLAG(USE_STARSCAN)
partition_alloc::internal::StackTopRegistry::Get().NotifyThreadCreated(
partition_alloc::internal::GetStackTop());

#if 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
Expand Down

1 comment on commit 0edc025

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

../../base/posix/unix_domain_socket.cc:83:26: warning: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'socklen_t' (aka 'unsigned int') [-Wshorten-64-to-32]
   83 |     msg.msg_controllen = control_len;
      |                        ~ ^~~~~~~~~~~
../../base/posix/unix_domain_socket.cc:91:22: warning: implicit conversion loses integer precision: 'unsigned long' to 'socklen_t' (aka 'unsigned int') [-Wshorten-64-to-32]
   91 |     cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size());
      |                    ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/include/sys/socket.h:364:63: note: expanded from macro 'CMSG_LEN'
  364 | #define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../../base/posix/unix_domain_socket.cc:172:51: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
  172 |     for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~
../../../../../../staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/include/sys/socket.h:358:44: note: expanded from macro 'CMSG_NXTHDR'
  358 |         __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.

Please sign in to comment.