diff options
| author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2019-11-13 23:36:46 +0200 |
|---|---|---|
| committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-13 13:36:46 -0800 |
| commit | dad6be5ffe48beb74fad78cf758b886afddc7aed (patch) | |
| tree | 838e3725e0b281904f0ad097e282997570469b1a /Modules | |
| parent | 61289d436661025a3111065482275d49a4850b8d (diff) | |
| download | cpython-git-dad6be5ffe48beb74fad78cf758b886afddc7aed.tar.gz | |
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 89b2fdea0f..5e1bcfbde2 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; } |
