Skip to content

Commit de106cc

Browse files
[3.15] gh-154822: Fix racy assertion during finalization (GH-154824) (GH-154828)
(cherry picked from commit cb0f028) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent 430b2d5 commit de106cc

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
@@ -3820,8 +3820,8 @@ handle_thread_shutdown_exception(PyThreadState *tstate)
38203820
assert(tstate != NULL);
38213821
assert(_PyErr_Occurred(tstate));
38223822
PyInterpreterState *interp = tstate->interp;
3823-
assert(interp->threads.head != NULL);
38243823
_PyEval_StopTheWorld(interp);
3824+
assert(interp->threads.head != NULL);
38253825

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

0 commit comments

Comments
 (0)