[Issue 23313] New: Accessing TLS is apparently fine from shared context
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 29 16:36:02 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23313
Issue ID: 23313
Summary: Accessing TLS is apparently fine from shared context
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mail at skoppe.eu
dg1 fails because `i` is not shared.
You would expect dg2 to fail as well. Somehow because `j` is an TLS variable
however, it is suddenly fine.
```
void main() @safe {
int i = 1;
static int j = 2;
auto dg1 = () shared @safe => i; // error
auto dg2 = () shared @safe => j; // no error??
}
```
--
More information about the Digitalmars-d-bugs
mailing list