You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some of the xx modules, a Py_mod_exec function steals a reference to the module argument when an error occurs (Py_XDECREF(m) after goto fail). It's a bit pernicious given the modules' stated intent to be used as a template, although I'm not sure how often this has actually happened. At the very least, I haven't noticed this outside the xx modules.
For Python <= 3.9, this affects xx_exec() in xxmodule.c and xx_modexec() in xxlimited.c. For Python >= 3.10, this affects xx_exec() in xxmodule.c and xx_modexec() in xxlimited_35.c.
We might as well clean up the whole init functions of those two template modules. For example, xxmodule.c does not check the return value of PyModule_AddObject (and it should use PyModule_AddType instead).
Activity
ov2k commentedon Feb 1, 2022
In some of the xx modules, a Py_mod_exec function steals a reference to the module argument when an error occurs (Py_XDECREF(m) after goto fail). It's a bit pernicious given the modules' stated intent to be used as a template, although I'm not sure how often this has actually happened. At the very least, I haven't noticed this outside the xx modules.
For Python <= 3.9, this affects xx_exec() in xxmodule.c and xx_modexec() in xxlimited.c. For Python >= 3.10, this affects xx_exec() in xxmodule.c and xx_modexec() in xxlimited_35.c.
erlend-aasland commentedon May 22, 2022
We might as well clean up the whole init functions of those two template modules. For example, xxmodule.c does not check the return value of
PyModule_AddObject(and it should usePyModule_AddTypeinstead).gh-90763: Modernise xx template module initialisation (#93078)
pythongh-90763: Modernise xx template module initialisation (pythonGH…
[3.11] pythongh-90763: Modernise xx template module initialisation (p…
gh-90763: Modernise xx template module initialisation (GH-93078)
[3.11] gh-90763: Modernise xx template module initialisation (GH-93078)…
erlend-aasland commentedon Jun 10, 2022
Fixed by:
Revert 30935 defer bpo45162 to 312 (#94285)