Message308647
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. |
|
Date |
User |
Action |
Args |
2017-12-19 14:40:38 | petr.viktorin | set | recipients:
+ petr.viktorin |
2017-12-19 14:40:38 | petr.viktorin | set | messageid: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> |
2017-12-19 14:40:38 | petr.viktorin | link | issue32374 messages |
2017-12-19 14:40:38 | petr.viktorin | create | |
|