Skip to content

[3.14] gh-161712: Read the clock once in ThreadHandle_join() (GH-161771) - #161843

Open
miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-88d137a-3.14
Open

miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-88d137a-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Py_MAX() evaluated _PyDeadline_Get() twice. If the deadline passed
between the two calls, the negative second value was used as the
timeout, which means no timeout, and Thread.join(timeout) could block
forever. main already reads it once since gh-157495.
(cherry picked from commit 88d137a)

Co-authored-by: Ahmed Semih Özmekik ahmed-semih@outlook.com

…ythonGH-161771)

Py_MAX() evaluated _PyDeadline_Get() twice. If the deadline passed
between the two calls, the negative second value was used as the
timeout, which means no timeout, and Thread.join(timeout) could block
forever. main already reads it once since pythongh-157495.
(cherry picked from commit 88d137a)

Co-authored-by: Ahmed Semih Özmekik <ahmed-semih@outlook.com>
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.

2 participants