Bug: Reference leak in _asyncio_Task___init___impl
in _asynciomodule.c
#126083
Labels
3.12
bugs and security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
easy
extension-modules
C modules in the Modules dir
topic-asyncio
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
I discovered this while working on #126080. If the func is given a context that isn't
None
, instead of doingPy_XSETREF
it'll just do a regular assignment meaning that whatever was there before wont have its reference count decreased.cpython/Modules/_asynciomodule.c
Lines 2122 to 2124 in 2544159
Output
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
asyncio.Task
when reinitializing with new non-None
context #126103asyncio.Task
when reinitializing with new non-None
context (GH-126103) #126229asyncio.Task
when reinitializing with new non-None
context (GH-126103) #126230The text was updated successfully, but these errors were encountered: