Similar to the issue fixed here https://github.com/dlang/druntime/pull/1655#issuecomment-279223238 ,static version of the sections_elf_shared.d accesses TLS of a dead thread here https://github.com/dlang/druntime/blob/d97ec4093b108dc2fa95f1fa04b1114e6e0611f8/src/rt/sections_elf_shared.d#L288 This was encountered on https://github.com/dlang/druntime/blob/master/test/thread/src/external_threads.d while porting ldc 1.24.0 to Alpine Linux which uses Musl. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/14364 But this issue should be affecting other libc implementations as well.
Proposed fix: https://github.com/dlang/druntime/pull/3308