Repository navigation
Conversation
Linux gives a socket without a local address one on all interfaces the first time it is used. Two calls reached that: * listen on an unbound socket listened on 0.0.0.0 and a port the kernel chose, so the network could connect in. It now fails with WSAEINVAL unless the socket has a loopback address, which is what Winsock does for an unbound socket; bind only ever gives loopback addresses. * A first sendto from an unbound datagram socket bound it to 0.0.0.0, so the network could send datagrams to it. It is now bound to loopback first (the mapped address for an IPv6 socket sending to 127.0.0.1). Tested: new an_unbound_socket_never_gets_all_interfaces; cargo test --workspace 417 passed; cargo xtask policy. Not run with a title. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 24, 2026
blockgameentity
added a commit
to blockgameentity/zafer
that referenced
this pull request
Nov 25, 2026
The PR was 131 commits behind main; its conflicts are resolved here: - calling convention: the PR's `extern "win64"` everywhere wins, since every function title code calls is win64 on both platforms (docs/linux.md). - dxgi: keeps main's `crate::device::is_device` (every device interface level), which the PR's narrower `[device::IID]` broke for Device1..8. - crash.rs: main's richer detail (memory_at, instruction_bytes, the C++ throw) is fed into the PR's shared `crash_log::Report` format. - thunks.rs: main's crash-log write for a trapped import, plus the PR's Linux ThunkBlock; both test modules kept. - lower.rs: main's `nonuniform_handles`/`wave_ops` and the PR's `annotations` test fields coexist; both test bodies kept. - files.rs/storage.rs/xuser.rs/lifecycle.rs: PR's Linux doc text and win64 signatures, with main's test bodies which need Windows-only cfgs. Three follow-up fixes from the PR's review comments are applied on top: - ws2_32: an unbound socket never gets all interfaces (x3ero0's review, spidercraft/VIctory#1). - GetProcAddress reads the exports of title DLLs we mapped, cmpxchg16b fixed registers, deterministic heap test (onpeek, #2). - AMD-only Zen 2 instructions (clzero, SSE4a extrq/insertq) emulated in the SIGILL handler (toothpaste011, #3). Also adds a Nix flake, a dev shell (default and windows-cross), a shell.nix shim and .envrc, and allowlists .nix/.envrc in the asset policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fix for the native Linux runtime in Marvisak#526, on top of
d46727f.Problem
linux/ws2_32.rskeeps the title off the network by narrowingbindto loopback and refusing connects and sends to anything else. Two paths got around it, because Linux gives a socket without a local address one on all interfaces the first time it is used:listenon an unbound socket listens on0.0.0.0and a port the kernel chooses, so other machines can connect in.sendtofrom an unbound datagram socket binds it to0.0.0.0, so other machines can send datagrams to it.Both are easy to see outside VIctory:
Change
listenfails withWSAEINVALunless the socket has a loopback address. Winsock returns the same error for an unbound socket, andbindonly ever gives loopback addresses.sendtobinds an unbound datagram socket to loopback before the first send. An IPv6 socket sending to127.0.0.1gets the mapped address, so dual-stack sends keep working.One file, about 100 lines including the test.
Testing
an_unbound_socket_never_gets_all_interfacescovers the unboundlisten, the first datagram, a second datagram keeping the address, and the IPv6 case.cargo test --workspace: 417 passed, 0 failed (Linux x86-64).cargo xtask policypasses.🤖 Generated with Claude Code