klzgrad 3e3f032b6f musl: allocator: Avoid deadlock in pthread_atfork
Musl 1.2.3 and before call malloc() in pthread_atfork(),
which may result in a deadlock:

    PartitionRoot::EnableThreadCacheIfSupported()
      ::partition_alloc::internal::ScopedGuard guard{lock_};
      ThreadCache::Create(this);
        ThreadCache::ThreadCache()
          PlatformThread::CurrentId()
            InitAtFork::InitAtFork()
              pthread_atfork()
                malloc()
                  ShimMalloc()
                    PartitionAllocFunctionsInternal::Malloc()
                      PartitionRoot::AllocInternal()
                        PartitionRoot::AllocInternalNoHooks()
                          PartitionRoot::RawAlloc()
                            ::partition_alloc::internal::ScopedGuard guard{internal::PartitionRootLock(this)};
2026-05-02 10:40:40 +08:00
2026-05-02 09:53:21 +08:00
Description
Make a fortune quietly
BSD-3-Clause 639 MiB
Languages
C++ 80.5%
Python 15.1%
C 1.3%
Objective-C++ 1.1%
Starlark 0.5%
Other 1.3%