www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17427] New: std.concurrency internal errors on uninitialised


          Issue ID: 17427
           Summary: std.concurrency internal errors on uninitialised
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

there are a bunch of functions in std.concurrency that take Tid as a parameter,
none(?) of which check the validity of that Tid (specifically the Mailbox
inside), resulting in mysterious segfaults in private functions if a user
accidentally calls those functions with an uninitialised Tid.

assert(tid.mbox !is null);

in the implementation (or ideally contracts) of these public API functions
would help.

May 24 2017