doc/man3/SSL_set_fd.pod: add note about Windows compiler warning#16699
Closed
mspncp wants to merge 1 commit intoopenssl:masterfrom
Closed
doc/man3/SSL_set_fd.pod: add note about Windows compiler warning#16699mspncp wants to merge 1 commit intoopenssl:masterfrom
mspncp wants to merge 1 commit intoopenssl:masterfrom
Conversation
According to an old stackoverflow thread [1], citing an even older comment by Andy Polyakov (1875e6d, Pull up Win64 support from 0.9.8., 2005-07-05), a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2), in practice the socket() implementation on Windows returns an index into the kernel handle table, the size of which is limited to 2^24 [3]. Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow. [1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64 [2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 [3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects
8c2fdfc to
e3f00b3
Compare
paulidale
approved these changes
Sep 28, 2021
Contributor
paulidale
left a comment
There was a problem hiding this comment.
Good for all three branches.
Collaborator
|
This pull request is ready to merge |
openssl-machine
pushed a commit
that referenced
this pull request
Sep 30, 2021
According to an old stackoverflow thread [1], citing an even older comment by Andy Polyakov (1875e6d, Pull up Win64 support from 0.9.8., 2005-07-05), a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2), in practice the socket() implementation on Windows returns an index into the kernel handle table, the size of which is limited to 2^24 [3]. Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow. [1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64 [2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 [3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects Reviewed-by: Paul Dale <[email protected]> (Merged from #16699)
openssl-machine
pushed a commit
that referenced
this pull request
Sep 30, 2021
According to an old stackoverflow thread [1], citing an even older comment by Andy Polyakov (1875e6d, Pull up Win64 support from 0.9.8., 2005-07-05), a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2), in practice the socket() implementation on Windows returns an index into the kernel handle table, the size of which is limited to 2^24 [3]. Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow. [1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64 [2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 [3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects Reviewed-by: Paul Dale <[email protected]> (Merged from #16699) (cherry picked from commit f8dd586)
openssl-machine
pushed a commit
that referenced
this pull request
Sep 30, 2021
According to an old stackoverflow thread [1], citing an even older comment by Andy Polyakov (1875e6d, Pull up Win64 support from 0.9.8., 2005-07-05), a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2), in practice the socket() implementation on Windows returns an index into the kernel handle table, the size of which is limited to 2^24 [3]. Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow. [1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64 [2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 [3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects Reviewed-by: Paul Dale <[email protected]> (Merged from #16699) (cherry picked from commit f8dd586)
Contributor
Author
dstebila
pushed a commit
to open-quantum-safe/openssl
that referenced
this pull request
Mar 15, 2022
According to an old stackoverflow thread [1], citing an even older comment by
Andy Polyakov (1875e6d, Pull up Win64 support from 0.9.8., 2005-07-05),
a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although
the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2),
in practice the socket() implementation on Windows returns an index into the kernel
handle table, the size of which is limited to 2^24 [3].
Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow.
[1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64
[2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2
[3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects
This patch applies cleanly to 3.0 and 1.1.1 as well, so I will cherry-pick it if there are no objections.
Checklist