]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
authorChris Jerdonek <chris.jerdonek@gmail.com>
Fri, 22 May 2020 20:33:27 +0000 (13:33 -0700)
committerGitHub <noreply@github.com>
Fri, 22 May 2020 20:33:27 +0000 (13:33 -0700)
commit7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e
tree2719af29b9bd410f1ed7f70b1ab1d3c9357713e0
parent909b5714e1303357868bc5e281c1cf508d5d5a17
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)

This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.
Include/internal/pycore_pyerrors.h
Lib/test/test_asyncio/test_tasks.py
Lib/test/test_generators.py
Misc/NEWS.d/next/Core and Builtins/2020-05-21-01-54-00.bpo-40696.u3n8Wx.rst [new file with mode: 0644]
Modules/_asynciomodule.c
Objects/genobject.c
Python/errors.c