www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18544] New: Thread-safety of "proto" GC before initialisation


          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: nobody puremagic.com
          Reporter: code klickverbot.at

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

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)

Mar 01 2018