Repository navigation
Read the Win32 errors that GHC 9.14.2's WinIO completes with - #667
Merged
Merged
Conversation
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>
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.
GHC 9.14.2 changed what WinIO hands a completion callback: the Win32 error from
RtlNtStatusToDosErrorinstead 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_codemaps 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 throughRtlNtStatusToDosErroron Windows.Tested on Windows 11 with GHC 9.14.2 and 9.12.5-rc4: 140 examples, 0 failures on both.
🤖 Generated with Claude Code