]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136) (GH...
authorVictor Stinner <vstinner@python.org>
Tue, 24 Mar 2020 16:56:01 +0000 (17:56 +0100)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 16:56:01 +0000 (17:56 +0100)
commitd1c09896c3b91d0ad7e3a14fabecde268f70dac7
tree78e69ef42d6b619d15c75df36228e3d99338e7d7
parent1cdc61c7673f71f2cef57715e482c84efda6d9e0
bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-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 5804f878e779712e803be927ca8a6df389d82cdf)
(cherry picked from commit e97c8b0688bc62959ced477d842fcd37992ef649)
Include/pystate.h
Misc/NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-20526.NHNZIv.rst [new file with mode: 0644]
Python/pystate.c