[llvm] [Support] Join threads when stopping ThreadPoolExecutor (PR #166054)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 15:13:19 PDT 2026


rnk wrote:

I agree, we should commit the workaround or come up with a different LLD-side fix so we don't rely on ABI-fragile features like vague linkage dynamically initialized thread local storage (mouthful). This code is just asking for obscure platform ABI problems:
```
template <typename T>
inline llvm::SpecificBumpPtrAllocator<T> &
getSpecificAllocSingletonThreadLocal() {
  thread_local SpecificAlloc<T> instance;
  return instance.alloc;
}
```

Should we be using `PerThreadAllocator` for `lld::makeThreadLocal<T>` instead? I'm not sure LLD perf is sensitive to the locality from the type specificity, or if we're using SpecificBumpPtrAllocator so we can run `DestroyAll` to catch leaks.

https://github.com/llvm/llvm-project/pull/166054


More information about the llvm-commits mailing list