[Issue 21910] New: Thread local variables hang the program in -betterC
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 9 23:28:27 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21910
Issue ID: 21910
Summary: Thread local variables hang the program in -betterC
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: blatblatnik at gmail.com
In 64bit windows builds, reading/writing thread local variables hangs the
program.
Forum post about this:
https://forum.dlang.org/post/prnlbekbxhmwggdjyhii@forum.dlang.org
Steps to reproduce:
- Compiler: dmd 2.096.1
- Platform: Windows 10 64-bit
```
// test.d
int a; // thread local
extern(C) void main() {
printf("before... ");
a = 42; // The program hangs here.
printf("after");
}
```
```
$ dmd -betterC test.d; ./test.exe
before... after
$ dmd -betterC -m64 test.d; ./test.exe
before... [program hangs for 3 seconds and exits without printing anything
else]
```
--
More information about the Digitalmars-d-bugs
mailing list