-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
[3.11] bpo-35191: Fix unexpected integer truncation in socket.setblocking() #10415
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
Conversation
It seems like we could further and make the |
It was fixed in #15609. |
On platforms with 64-bit long, socket.setblocking(x) treated all x which lower 32 bits are zero as False due to integer truncation. Reported by ubsan.
72036ce
to
cda490b
Compare
Rebased on 3.11 which still is not fixed. |
@serhiy-storchaka: Maybe you made a mistake, since suddenly, the change started to change 1723 files :-D This PR is for the 3.11 branch. Maybe a new PR for the main branch should be written instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
On platforms with 64-bit long, socket.setblocking(x) treated all x
which lower 32 bits are zero as False due to integer truncation.
Reported by ubsan.
https://bugs.python.org/issue35191