Skip to content

Read the Win32 errors that GHC 9.14.2's WinIO completes with - #667

Merged
kazu-yamamoto merged 3 commits into
haskell:masterfrom
kazu-yamamoto:winio-win32-errors
Dec 5, 2026
Merged

kazu-yamamoto merged 3 commits into
haskell:masterfrom
kazu-yamamoto:winio-win32-errors

Conversation

@kazu-yamamoto

Copy link
Copy Markdown
Collaborator

GHC 9.14.2 changed what WinIO hands a completion callback: the Win32 error from RtlNtStatusToDosError instead of the raw NTSTATUS (GHC #27971, commit 13fc3f5b). network read both as a Winsock code, so on 9.14.2 a truncated datagram (ERROR_MORE_DATA, 234) or an ICMP port unreachable (ERROR_PORT_UNREACHABLE, 1234) became "Unknown WinSock error", and the tests failed.

  • hsnet_winsock_code maps these Win32 errors to Winsock codes too, alongside the NTSTATUS that GHC 9.12 still hands over. The table is the existing NTSTATUS one, passed through RtlNtStatusToDosError on Windows.
  • CI runs Windows again, with GHC 9.14.2.

Tested on Windows 11 with GHC 9.14.2 and 9.12.5-rc4: 140 examples, 0 failures on both.

🤖 Generated with Claude Code

kazu-yamamoto and others added 3 commits December 2, 2026 09:33
GHC 9.14.2 hands a completion over with RtlNtStatusToDosError of its
NTSTATUS (GHC #27971), which network took for a Winsock code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kazu-yamamoto
kazu-yamamoto merged commit 7748f19 into haskell:master Dec 5, 2026
@kazu-yamamoto
kazu-yamamoto deleted the winio-win32-errors branch December 5, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant