Skip to content

Commit cb0f028

Browse files
gh-154822: Fix racy assertion during finalization (GH-154824)
1 parent 2ffab08 commit cb0f028

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/pylifecycle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3827,8 +3827,8 @@ handle_thread_shutdown_exception(PyThreadState *tstate)
38273827
assert(tstate != NULL);
38283828
assert(_PyErr_Occurred(tstate));
38293829
PyInterpreterState *interp = tstate->interp;
3830-
assert(interp->threads.head != NULL);
38313830
_PyEval_StopTheWorld(interp);
3831+
assert(interp->threads.head != NULL);
38323832

38333833
// We don't have to worry about locking this because the
38343834
// world is stopped.

0 commit comments

Comments
 (0)