summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2020-05-22 20:33:27 (GMT)
committerGitHub <noreply@github.com>2020-05-22 20:33:27 (GMT)
commit7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e (patch)
tree2719af29b9bd410f1ed7f70b1ab1d3c9357713e0 /Include
parent909b5714e1303357868bc5e281c1cf508d5d5a17 (diff)
downloadcpython-7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e.zip
cpython-7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e.tar.gz
cpython-7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_pyerrors.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h
index 3290a37..2cf1160 100644
--- a/Include/internal/pycore_pyerrors.h
+++ b/Include/internal/pycore_pyerrors.h
@@ -51,7 +51,7 @@ PyAPI_FUNC(void) _PyErr_SetObject(
PyObject *value);
PyAPI_FUNC(void) _PyErr_ChainStackItem(
- _PyErr_StackItem *exc_state);
+ _PyErr_StackItem *exc_info);
PyAPI_FUNC(void) _PyErr_Clear(PyThreadState *tstate);