summaryrefslogtreecommitdiffstats
path: root/Python/tracemalloc.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-03-29 22:58:08 (GMT)
committerGitHub <noreply@github.com>2024-03-29 22:58:08 (GMT)
commitbfc57d43d8766120ba0c8f3f6d7b2ac681a81d8a (patch)
tree33ad4298aa1f2532c876a08244e387a9e8cfb572 /Python/tracemalloc.c
parent05e0b67a43c5c1778dc2643c8b7c12864e135999 (diff)
downloadcpython-bfc57d43d8766120ba0c8f3f6d7b2ac681a81d8a.zip
cpython-bfc57d43d8766120ba0c8f3f6d7b2ac681a81d8a.tar.gz
cpython-bfc57d43d8766120ba0c8f3f6d7b2ac681a81d8a.tar.bz2
gh-117303: Don't detach in `PyThreadState_DeleteCurrent()` (#117304)
This fixes a crash in `test_threading.test_reinit_tls_after_fork()` when running with the GIL disabled. We already properly handle the case where the thread state is `_Py_THREAD_ATTACHED` in `tstate_delete_common()` -- we just need to remove an assertion. Keeping the thread attached means that a stop-the-world pause, such as for a `fork()`, won't commence until we remove our thread state from the interpreter's linked list. This prevents a crash when the child process tries to clean up the dead thread states.
Diffstat (limited to 'Python/tracemalloc.c')
0 files changed, 0 insertions, 0 deletions