[Issue 14137] New: std.socket.getAddressInfo breaks @safety

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 6 17:06:14 PST 2015


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

          Issue ID: 14137
           Summary: std.socket.getAddressInfo breaks @safety
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: safe
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: code at klickverbot.at

---
struct Oops {
    const(char[]) convert() {
        *cast(int*)0xcafebabe = 0xdeadbeef;
        return null;
    }
    alias convert this;
}

void main() @safe {
    import std.socket;
    getAddressInfo("", Oops.init);
}
---

Seems to be Git master (to-be 2.067) only.

Source permalink:
https://github.com/D-Programming-Language/phobos/blob/master/std/socket.d#L996-L997

Introduced in https://github.com/D-Programming-Language/phobos/pull/2316.

--


More information about the Digitalmars-d-bugs mailing list