Skip to content

[3.8] bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) #19136

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

Merged
merged 1 commit into from
Mar 24, 2020
Merged

[3.8] bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) #19136

merged 1 commit into from
Mar 24, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 24, 2020

PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f87)

https://bugs.python.org/issue20526

PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f87)
@vstinner vstinner merged commit e97c8b0 into python:3.8 Mar 24, 2020
@vstinner vstinner deleted the tstate_clear38 branch March 24, 2020 16:14
vstinner added a commit that referenced this pull request Mar 24, 2020
…H-19136) (GH-19137)

PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f87)
(cherry picked from commit e97c8b0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants