Ronald Oussoren added the comment:
The attached patch fixes the crash, but I haven't verified if the patch
is actually correct.
With this patch some PyThread API's are called after PyInterpreterState_Clear
and I don't know if it is valid to do so. All
unittests pass fine on OSX though.
Added file: http://bugs.python.org/file8793/pygilstate.patch
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1402>
__________________________________
Index: Python/pythonrun.c
===================================================================
--- Python/pythonrun.c (revision 59115)
+++ Python/pythonrun.c (working copy)
@@ -437,14 +437,15 @@
_Py_PrintReferences(stderr);
#endif /* Py_TRACE_REFS */
+
+ /* Clear interpreter state */
+ PyInterpreterState_Clear(interp);
+
/* Cleanup auto-thread-state */
#ifdef WITH_THREAD
_PyGILState_Fini();
#endif /* WITH_THREAD */
- /* 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
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com