[Issue 17427] New: std.concurrency internal errors on uninitialised mailbox

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 24 10:47:33 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17427

          Issue ID: 17427
           Summary: std.concurrency internal errors on uninitialised
                    mailbox
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at 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.

--


More information about the Digitalmars-d-bugs mailing list