[Issue 18544] New: Thread-safety of "proto" GC before initialisation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 1 15:57:04 UTC 2018


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

--


More information about the Digitalmars-d-bugs mailing list