[Issue 15975] New: TLS not scanned correctly for main thread

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 1 02:03:21 PDT 2016


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

          Issue ID: 15975
           Summary: TLS not scanned correctly for main thread
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

I don't have an reliable reproduction of the problem, but LDC builds sometimes
fail due to memory being collected while still being referenced. It turns out
that TLS memory of the memory can be misaligned:

import core.stdc.stdio;

void* tls;

void main()
{
    printf("&tls = %p\n", &tls);
}

outputs

&tls = 0x7fe7da7e79bc

for 64-bit builds. Please note that the address is not aligned to 8 bytes!

--


More information about the Digitalmars-d-bugs mailing list