This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petr.viktorin
Recipients petr.viktorin
Date 2017-12-19.14:40:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za>
In-reply-to
Content
After the create phase of multiphase initialization, the per-module state is NULL and the module object is reachable by the garbage collector. Between the create and exec phases, Python code is run and garbage collection can be triggered.
So, any custom m_traverse/m_clear/m_free function must be prepared to handle m_state being NULL. This is currently not well documented.

It might be useful to insert a call m_traverse after the first phase, at least in --with-pydebug mode, so the potential error gets triggered early.
History
Date User Action Args
2017-12-19 14:40:38petr.viktorinsetrecipients: + petr.viktorin
2017-12-19 14:40:38petr.viktorinsetmessageid: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za>
2017-12-19 14:40:38petr.viktorinlinkissue32374 messages
2017-12-19 14:40:38petr.viktorincreate