Marc-Andre Lemburg added the comment: On 12.04.2013 16:00, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > >> At the time the Py_AtExit functions are called, the thread state is NULL > > I'd say this is the root cause. It's a bad thing to call Py_DECREF without a > thread state. > Was it the case in previous versions?
The extension has been using this ever since it was written many years ago and without any problems in all Python versions up, but not including 2.7.4. It's the only way to do module cleanup in Python 2.x. So far, we've only seen the problem for dictionaries that are DECREFed. I know that things may go wrong when DECREF'ing objects this late in the finalization process, but still expect Python to handle errors gracefully without segfaulting, as it has been the case for all previous Python versions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17703> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com