GeezerVison is showing github.com — [3.11] bpo-35191: Fix unexpected integer truncation in socket.setblocking() by izbyshev · Pull Request #10415 · python/cpython
Conversation
izbyshev
commented
Nov 8, 2018
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
It seems like we could further and make the block argument to internal_setblocking a real C bool.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
It was fixed in #15609. PyObject_IsTrue() is now used instead of PyLong_AsLong().
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
serhiy-storchaka
requested review from
a team,
AlexWaygood,
FFY00,
JelleZijlstra,
barneygale,
berkerpeksag,
brettcannon,
cjw296,
corona10,
encukou,
ericvsmith,
erlend-aasland,
ethanfurman,
gpshead,
hauntsaninja,
rhettinger and
terryjreedy
as code owners
December 1, 2023 12:59
serhiy-storchaka
removed request for
a team,
1st1,
JelleZijlstra,
abalkin,
asvetlov,
barneygale,
berkerpeksag,
brettcannon,
cjw296,
encukou,
ericsnowcurrently,
ericvsmith,
gpshead,
hugovk,
iritkatriel,
jaraco,
methane,
ncoghlan,
pganssle,
tiran,
vsajip and
warsaw
December 1, 2023 13:02
|
Rebased on 3.11 which still is not fixed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@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?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
vstinner
vstinner approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|