◐ Shell
reader mode source ↗
Skip to content

bpo-33632: Avoid signed integer overflow in the _thread module#12729

Closed
ZackerySpytz wants to merge 1 commit into
python:mainfrom
ZackerySpytz:bpo-33632-_thread-module-overflow
Closed

bpo-33632: Avoid signed integer overflow in the _thread module#12729
ZackerySpytz wants to merge 1 commit into
python:mainfrom
ZackerySpytz:bpo-33632-_thread-module-overflow

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Apr 8, 2019

Copy link
Copy Markdown
Contributor

Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
@pganssle

pganssle commented Apr 8, 2019

Copy link
Copy Markdown
Member

@ZackerySpytz The approach looks good to me, but I think it would be good to add a test here.

Is timeout something a user can specify? If timeout + now overflows, does it actually raise an error, or does it just set endtime to a negative number, causing this to time out immediately?

I also think it might be worth adding some of the details of exactly what user-facing behaviors will change with this patch to the changelog. "Avoid signed integer overflow" doesn't mean too much to me, out of context, and the BPO report is not much more detailed.

@vadmium

vadmium commented Apr 20, 2019

Copy link
Copy Markdown
Member

To clarify the changelog, you could say it is a timeout value that causes the overflow, and figure out what APIs are affected. I suspect some acquire method(s) of lock object(s), such as threading.Lock.acquire, but someone with an up-to-date copy of the code should confirm.

@csabella

Copy link
Copy Markdown
Contributor

@ZackerySpytz, please take a look at the code review comments. Thanks!

@hongweipeng

Copy link
Copy Markdown
Contributor

@ZackerySpytz Are you interested in continuing to work on this PR?

@iritkatriel

Copy link
Copy Markdown
Member

This was fixed in #28674, as mentioned on the bpo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants