diff options
author | Anthony Baxter <anthonybaxter@gmail.com> | 2005-03-29 13:36:16 (GMT) |
---|---|---|
committer | Anthony Baxter <anthonybaxter@gmail.com> | 2005-03-29 13:36:16 (GMT) |
commit | 12b6f6cac7299afc6790cb68591ccc9b2adbeff4 (patch) | |
tree | 097fc40b721ce6671b831bd5a71c4807cda578ed | |
parent | b7e99b642f75ce2b4f31af26b693feda00c9da7c (diff) | |
download | cpython-12b6f6cac7299afc6790cb68591ccc9b2adbeff4.zip cpython-12b6f6cac7299afc6790cb68591ccc9b2adbeff4.tar.gz cpython-12b6f6cac7299afc6790cb68591ccc9b2adbeff4.tar.bz2 |
Move exception finalisation later in the shutdown process - this
fixes the crash seen in bug #1165761
-rw-r--r-- | Misc/NEWS | 5 | ||||
-rw-r--r-- | Python/pythonrun.c | 15 |
2 files changed, 13 insertions, 7 deletions
@@ -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 diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 6d69165..f629709 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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); |