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.

Title: Py_XDECREF() module on fail in Py_mod_exec
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ov2k
Priority: normal Keywords:

Created on 2022-02-01 21:49 by ov2k, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg412315 - (view) Author: (ov2k) Date: 2022-02-01 21:49
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.
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90763
2022-02-01 21:49:08ov2kcreate