diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2019-11-13 21:36:46 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-13 21:36:46 (GMT) |
commit | dad6be5ffe48beb74fad78cf758b886afddc7aed (patch) | |
tree | 838e3725e0b281904f0ad097e282997570469b1a /Modules | |
parent | 61289d436661025a3111065482275d49a4850b8d (diff) | |
download | cpython-dad6be5ffe48beb74fad78cf758b886afddc7aed.zip cpython-dad6be5ffe48beb74fad78cf758b886afddc7aed.tar.gz cpython-dad6be5ffe48beb74fad78cf758b886afddc7aed.tar.bz2 |
bpo-38785: Prevent asyncio from crashing (GH-17144)
if parent `__init__` is not called from a constructor of object derived from `asyncio.Future`
https://bugs.python.org/issue38785
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 89b2fde..5e1bcfb 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -1091,6 +1091,7 @@ static PyObject * _asyncio_Future_get_loop_impl(FutureObj *self) /*[clinic end generated code: output=119b6ea0c9816c3f input=cba48c2136c79d1f]*/ { + ENSURE_FUTURE_ALIVE(self) Py_INCREF(self->fut_loop); return self->fut_loop; } |