-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
parking_lot.c should check for overflow in Windows _PySemaphore_PlatformWait
code path
#112804
Labels
3.13
bugs and security fixes
OS-windows
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Comments
colesbury
added
type-bug
An unexpected behavior, bug, or error
3.13
bugs and security fixes
topic-free-threading
labels
Dec 6, 2023
corona10
added a commit
to corona10/cpython
that referenced
this issue
Oct 3, 2024
corona10
added a commit
that referenced
this issue
Oct 5, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 5, 2024
…pythongh-124914) * pythongh-112804: Clamping timeout value for _PySemaphore_PlatformWait * Address code review * nit (cherry picked from commit a5fc509) Co-authored-by: Donghee Na <[email protected]>
corona10
added a commit
to miss-islington/cpython
that referenced
this issue
Oct 7, 2024
…pythongh-124914) * pythongh-112804: Clamping timeout value for _PySemaphore_PlatformWait * Address code review * nit (cherry picked from commit a5fc509) Co-authored-by: Donghee Na <[email protected]>
@colesbury, I am closing the issue if we need to reopen it. please let me know. |
Thanks for fixing this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
bugs and security fixes
OS-windows
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Bug report
The cast in
millis = (DWORD) (timeout / 1000000);
may overflow becauseDWORD
is an unsigned 32-bit integer andtimeout
is a 64-bit integer. We should clamp the result if the cast would overflow.cpython/Python/parking_lot.c
Lines 93 to 105 in cc7e45c
Noticed by @vstinner in #112733 (review)
Linked PRs
The text was updated successfully, but these errors were encountered: