upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/tiny_game_exit_code_test.cpp
diff options
context:
space:
mode:
authorTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-27 20:07:18 -0600
committerTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-27 20:07:18 -0600
commit37163d100f429ba5467f104142268b575c8d49a1 (patch)
treedb42a9f4a9b961ee3ce81fb137b7ac1953710dad /runtime/test/tiny_game_exit_code_test.cpp
parentf589998bf73cab6d0cf2f7fca6c62c6c39e0bd38 (diff)
ws2_offline: the host reports an extension lookup's completion; AI_NUMERICHOST keeps localhost a name
From timbot103's review of #2533. - The ConnectEx and WSASendMsg lookups no longer complete the caller's overlapped themselves (complete_now). That posted no packet for a socket on an I/O completion port, so a caller waiting in GetQueuedCompletionStatus hung, and it signalled an overlapped a socket without WSA_FLAG_OVERLAPPED must ignore; its APC record also leaked if the thread never waited alertably. The host's WSAIoctl now gets the caller's overlapped and completion routine again, so the completion is reported as Winsock reports it, but writes its own pointer and byte count into storage of the shim's (wrap_extension_lookup): freed when the call completed, kept if the host reports it pending. The caller's buffer holds the wrapper before the host is called, so a packet another thread dequeues already finds it, and gets its old contents back on failure. - With AI_NUMERICHOST, "localhost" is passed on as the name, so the host refuses it with EAI_NONAME instead of the shim answering with a literal. ws2_offline_test: a completion-port socket gets its packet with the wrapped pointer; on a socket without WSA_FLAG_OVERLAPPED the overlapped ends as the host's own WSAIoctl leaves it; getaddrinfo(localhost, AI_NUMERICHOST) is EAI_NONAME. The event and routine cases follow what Windows 11 does for this lookup (measured: event set, routine run once, packet posted, 0 bytes in the OVERLAPPED). The previous commit fails these 3 checks; 87/87 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions