]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-104690: thread_run() checks for tstate dangling pointer (#109056) (#109133)
authorVictor Stinner <vstinner@python.org>
Mon, 2 Oct 2023 14:55:06 +0000 (16:55 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 14:55:06 +0000 (16:55 +0200)
commit30748d36b33fe08be98c8be4e629418584c796b0
tree2c9ae790d0178881e9a66e7fb265a1a6443bebc2
parent9207c870bec173dafd3f2e6c811482c782db034f
[3.12] gh-104690: thread_run() checks for tstate dangling pointer (#109056) (#109133)

gh-104690: thread_run() checks for tstate dangling pointer (#109056)

thread_run() of _threadmodule.c now calls
_PyThreadState_CheckConsistency() to check if tstate is a dangling
pointer when Python is built in debug mode.

Rename ceval_gil.c is_tstate_valid() to
_PyThreadState_CheckConsistency() to reuse it in _threadmodule.c.

(cherry picked from commit f63d37877ad166041489a968233b57540f8456e8)
Include/internal/pycore_pystate.h
Modules/_threadmodule.c
Python/ceval_gil.c
Python/pystate.c