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
Fix socket descriptor checks on Windows #24035
Closed
Closed
Conversation
This file contains 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
t8m
approved these changes
Apr 4, 2024
t8m
added
branch: master
Merge to master branch
approval: review pending
This pull request needs review by a committer
triaged: bug
The issue/pr is/fixes a bug
branch: 3.0
Merge to openssl-3.0 branch
branch: 3.1
Merge to openssl-3.1
tests: exempted
The PR is exempt from requirements for testing
branch: 3.2
Merge to openssl-3.2
branch: 3.3
Merge to openssl-3.3
labels
Apr 4, 2024
nhorman
approved these changes
Apr 4, 2024
I could not reproduce the testing framework failure.
Could it be an issue with the testing framework itself? |
t8m
added
approval: done
This pull request has the required number of approvals
and removed
approval: review pending
This pull request needs review by a committer
labels
Apr 5, 2024
openssl-machine
added
approval: ready to merge
The 24 hour grace period has passed, ready to merge
and removed
approval: done
This pull request has the required number of approvals
labels
Apr 6, 2024
This pull request is ready to merge |
Merged to all the active branches. Thank you for your contribution. |
openssl-machine
pushed a commit
that referenced
this pull request
Apr 10, 2024
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #24035)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approval: ready to merge
The 24 hour grace period has passed, ready to merge
branch: master
Merge to master branch
branch: 3.0
Merge to openssl-3.0 branch
branch: 3.1
Merge to openssl-3.1
branch: 3.2
Merge to openssl-3.2
branch: 3.3
Merge to openssl-3.3
tests: exempted
The PR is exempt from requirements for testing
triaged: bug
The issue/pr is/fixes a bug
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.
The socket range checks introduced in e98c735 break non-blocking socket operations on Windows. This causes random
WSAENOTCONN
errors in subsequent read/write attempts.In the implementation of the
socket()
function in Windows, the nfds parameter is ignored and included only for compatibility with Berkeley sockets. On Windows, theFD_SETSIZE
value contains the maximum total number of sockets in fd_set rather than the limit for forFD_SET()
andFD_CLR()
macros.https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-select
Also, the Winsock invalid SOCKET value is
INVALID_SOCKET
, and not any integer < 0 as on Unix.https://learn.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2
My PR fixes checking Windows socket value according to Microsoft documentation.