[Issue 14980] New: getAddressInfo(null) broken

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 29 20:01:32 PDT 2015


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

          Issue ID: 14980
           Summary: getAddressInfo(null) broken
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: thecybershadow at gmail.com

////////////////////////// test.d //////////////////////////
import std.socket;
import std.stdio;

void main()
{
    auto ai = getAddressInfo(null, "1", AddressFamily.INET);
    assert(ai.length == 1);
}
////////////////////////////////////////////////////////////

On 2.068, getAddressInfo(null) is the same as getAddressInfo(""). On Windows,
this binds to all external interfaces (but not localhost); on POSIX, this
throws.

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

Underlying problem is almost surely the same as issue 14979, but unlike 14979
this also occurs on x86.

--


More information about the Digitalmars-d-bugs mailing list