https://issues.dlang.org/show_bug.cgi?id=18544
Issue ID: 18544
Summary: Thread-safety of "proto" GC before initialisation
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
https://github.com/dlang/druntime/pull/2057 was merged without thread safety
concerns being addressed.
The code needs to be checked carefully for its behaviour when several threads
are accessing the GC before the ProtoGC has been swapped out with the real
implementation
(https://github.com/dlang/druntime/pull/2057#discussion_r168910433).
If threads are created using the standard "auto t = new Thread(...); […]"
idiom, this is of course not going to be an issue, because the GC will already
have been initialised when the child thread is spawned. However, it is
conceivable that two independent C threads concurrently start to use D(runtime)
code.
--