]> granicus.if.org Git - python/commitdiff
Move exception finalisation later in the shutdown process - this
authorAnthony Baxter <anthonybaxter@gmail.com>
Tue, 29 Mar 2005 13:36:16 +0000 (13:36 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Tue, 29 Mar 2005 13:36:16 +0000 (13:36 +0000)
fixes the crash seen in bug #1165761

Misc/NEWS
Python/pythonrun.c

index 9a63f2103812dccc1989dc27f4f5fa3217a8d5e0..976e019bfe960202aed8a4228e924012be9bd226 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -7,9 +7,14 @@ Python News
 What's New in Python 2.5 alpha 1?
 =================================
 
+*Release date: XX-XXX-2006*
+
 Core and builtins
 -----------------
 
+- Move exception finalisation later in the shutdown process - this 
+  fixes the crash seen in bug #1165761
+
 - Added two new builtins, any() and all().
 
 - Defining a class with empty parentheses is now allowed
index 6d691655cca546c228e05874df0c46e044440826..f629709af8599fa1cf578063fb70b4a7342ed4dd 100644 (file)
@@ -392,13 +392,6 @@ Py_Finalize(void)
                _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 @@ Py_Finalize(void)
        /* 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);