Skip to content

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

Merged
vstinner merged 1 commit intopython:3.7from
vstinner:tstate_clear37
Mar 24, 2020
Merged

[3.7] bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136)#19137
vstinner merged 1 commit intopython:3.7from
vstinner:tstate_clear37

Conversation

@vstinner
Copy link
Copy Markdown
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)
(cherry picked from commit e97c8b0)

https://bugs.python.org/issue20526

…H-19136)

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