[New-bugs-announce] [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c

Chris Jerdonek report at bugs.python.org
Fri May 8 03:40:03 EDT 2020


New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:

There is a missing Py_DECREF in task_step_impl() in _asynciomodule.c:
https://github.com/python/cpython/blob/02fa0ea9c1073e4476c9bde3d7112f5dd964aa57/Modules/_asynciomodule.c#L2641

It should have the form:

    if (clear_exc) {
        Py_DECREF(exc);
    }

This was introduced here in 3.7:
https://github.com/python/cpython/commit/bca4939d806170c3ca5d05f23710d11a8f1669cf

I'm not sure of the likelihood of this ever getting triggered (it appears to be unlikely), but it should still be addressed.

I will file a patch shortly.

----------
components: asyncio
messages: 368425
nosy: asvetlov, chris.jerdonek, yselivanov
priority: normal
severity: normal
status: open
title: Missing Py_DECREF in task_step_impl() in _asynciomodule.c
type: resource usage
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40559>
_______________________________________


More information about the New-bugs-announce mailing list