From: Neil Schemenauer Date: Wed, 4 Oct 2000 16:25:07 +0000 (+0000) Subject: - do not start collection during processing of an exception X-Git-Tag: v2.0c1~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97d723bd6219f2d460a68137e5e23533888164c2;p=thirdparty%2FPython%2Fcpython.git - do not start collection during processing of an exception --- diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index cf884814d230..ba950327770f 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -502,7 +502,11 @@ _PyGC_Insert(PyObject *op) abort(); } #endif - if (allocated > threshold0 && enabled && threshold0 && !collecting) { + if (allocated > threshold0 && + enabled && + threshold0 && + !collecting && + !PyErr_Occurred()) { collecting++; collect_generations(); collecting--;