]> granicus.if.org Git - python/commitdiff
bpo-33612: Remove PyThreadState_Clear() assertion (#7069)
authorVictor Stinner <vstinner@redhat.com>
Wed, 23 May 2018 16:00:55 +0000 (18:00 +0200)
committerGitHub <noreply@github.com>
Wed, 23 May 2018 16:00:55 +0000 (18:00 +0200)
bpo-25612, bpo-33612: Remove an assertion from PyThreadState_Clear()
which failed at Python shutdown or on fork if a thread was running a
generator.

Python/pystate.c

index d276bfc7e8afc69cbe82ed9ddb65796f36a978ee..4534c4770f24c5967ac496db4fdf5ed9508eb2c6 100644 (file)
@@ -586,7 +586,6 @@ PyThreadState_Clear(PyThreadState *tstate)
     Py_CLEAR(tstate->exc_state.exc_traceback);
 
     /* The stack of exception states should contain just this thread. */
-    assert(tstate->exc_info->previous_item == NULL);
     if (Py_VerboseFlag && tstate->exc_info != &tstate->exc_state) {
         fprintf(stderr,
           "PyThreadState_Clear: warning: thread still has a generator\n");