[Issue 21465] New: Static druntime accesses TLS after the thread is dead

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 9 16:46:21 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21465

          Issue ID: 21465
           Summary: Static druntime accesses TLS after the thread is dead
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: omerfirmak at gmail.com

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.

--


More information about the Digitalmars-d-bugs mailing list