]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-104690: thread_run() checks for tstate dangling pointer (#109056)
authorVictor Stinner <vstinner@python.org>
Fri, 8 Sep 2023 09:50:46 +0000 (11:50 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 09:50:46 +0000 (11:50 +0200)
commitf63d37877ad166041489a968233b57540f8456e8
treed4c6bb8c8478a3d0e3760b11e7e24a143012ba6e
parentb0edf3b98e4b3e68a13776e034b9dd86ad7e529d
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.
Include/internal/pycore_pystate.h
Modules/_threadmodule.c
Python/ceval_gil.c
Python/pystate.c