Skip to content

[3.9] bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287) - #20322

Merged
cjerdonek merged 1 commit into
python:3.9from
miss-islington:backport-7c30d12-3.9
May 22, 2020
Merged

cjerdonek merged 1 commit into
python:3.9from
miss-islington:backport-7c30d12-3.9

Conversation

@miss-islington

@miss-islington miss-islington commented May 22, 2020 •

Copy link
Copy Markdown
Contributor

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.
(cherry picked from commit 7c30d12)

Co-authored-by: Chris Jerdonek chris.jerdonek@gmail.com

https://bugs.python.org/issue40696

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.
(cherry picked from commit 7c30d12)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@cjerdonek: Status check is done, and it's a success ✅ .

@cjerdonek
cjerdonek merged commit 7f77ac4 into python:3.9 May 22, 2020
@miss-islington
miss-islington deleted the backport-7c30d12-3.9 branch May 22, 2020 21:35
@miss-islington

Copy link
Copy Markdown
Contributor Author

@cjerdonek: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington

Copy link
Copy Markdown
Contributor Author

@cjerdonek: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants