[Python-checkins] python/dist/src/Python pythonrun.c, 2.211, 2.211.2.1

anthonybaxter at users.sourceforge.net anthonybaxter at users.sourceforge.net
Tue Mar 29 14:32:54 CEST 2005


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16421/Python

Modified Files:
      Tag: release24-maint
	pythonrun.c 
Log Message:
Move exception finalisation later in the shutdown process - this 
fixes the crash seen in bug #1165761


Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.211
retrieving revision 2.211.2.1
diff -u -d -r2.211 -r2.211.2.1
--- pythonrun.c	13 Oct 2004 14:48:50 -0000	2.211
+++ pythonrun.c	29 Mar 2005 12:32:50 -0000	2.211.2.1
@@ -392,13 +392,6 @@
 		_Py_PrintReferences(stderr);
 #endif /* Py_TRACE_REFS */
 
-	/* Now we decref the exception classes.  After this point nothing
-	   can raise an exception.  That's okay, because each Fini() method
-	   below has been checked to make sure no exceptions are ever
-	   raised.
-	*/
-	_PyExc_Fini();
-
 	/* Cleanup auto-thread-state */
 #ifdef WITH_THREAD
 	_PyGILState_Fini();
@@ -407,6 +400,14 @@
 	/* Clear interpreter state */
 	PyInterpreterState_Clear(interp);
 
+	/* Now we decref the exception classes.  After this point nothing
+	   can raise an exception.  That's okay, because each Fini() method
+	   below has been checked to make sure no exceptions are ever
+	   raised.
+	*/
+
+	_PyExc_Fini();
+
 	/* Delete current thread */
 	PyThreadState_Swap(NULL);
 	PyInterpreterState_Delete(interp);



More information about the Python-checkins mailing list