Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.socket.InternetHost.getHostByAddr unittest does not work with IPv6 #9773

Open
dlangBugzillaToGithub opened this issue Jun 22, 2019 · 1 comment
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Normal

Comments

@dlangBugzillaToGithub
Copy link

dlang (@Vild) reported this on 2019-06-22T18:51:42Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=19997

CC List

Description

The unittest[1] does not work when www.digitalmars.com resolved to a IPv6 address.

[1] https://github.com/dlang/phobos/blob/35e9f2fbbaab75815c01a7e6b7d207e98afb9d56/std/socket.d#L790

---

core.exception.AssertError@std/socket.d(790): unittest failure
----------------
??:? onAssertErrorMsg [0x7f7b50a58a23]
??:? onUnittestErrorMsg [0x7f7b50a58aa5]
??:? _d_unittest_msg [0x7f7b50a58d64]
??:? _d_unittest [0x7f7b50a58da5]
??:? _d_unittestp [0x7f7b50a58d1d]
??:? @safe void std.socket.__unittest_L773_C7() [0x7f7b4f81033c]
??:? void std.socket.__modtest() [0x7f7b4f81c636]
../druntime/src/test_runner.d:61 [0x56463967c9db]
../druntime/src/test_runner.d:32 [0x56463967c8e7]
../druntime/src/test_runner.d:13 [0x56463967c71f]
??:? runModuleUnitTests [0x7f7b50a59946]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x7f7b50a80c49]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x7f7b50a80bc4]
??:? _d_run_main [0x7f7b50a80b2a]
??:? [0x56463967cfa1]
??:? __libc_start_main [0x7f7b4b853ee2]
```
@dlangBugzillaToGithub
Copy link
Author

shove commented on 2019-07-05T12:19:00Z

https://github.com/dlang/phobos/blob/35e9f2fbbaab75815c01a7e6b7d207e98afb9d56/std/socket.d#L986

Also here, IPv6 can cause exceptions.
std/socket.d does not fully support IPv6, such as GetHostByAddr().

Perfecting std/socket.d to fully support IPv6 is certainly the best, but it's a bit of a workload.
So it may be a short-term solution to temporarily handle unittest to make it work properly. Otherwise, auto-tester of PR will be interrupted frequently.

@LightBender LightBender removed the P3 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Normal
Projects
None yet
Development

No branches or pull requests

2 participants