Skip to content

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

Closed
miss-islington wants to merge 1 commit intopython:3.9from
miss-islington:backport-7c30d12-3.9
Closed

[3.9] bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)#20321
miss-islington wants to merge 1 commit intopython:3.9from
miss-islington:backport-7c30d12-3.9

Conversation

@miss-islington
Copy link
Contributor

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

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 [email protected]

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 <[email protected]>
@miss-islington
Copy link
Contributor Author

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

1 similar comment
@miss-islington
Copy link
Contributor Author

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

@cjerdonek cjerdonek closed this May 22, 2020
@miss-islington miss-islington deleted the backport-7c30d12-3.9 branch May 22, 2020 21:13
@miss-islington
Copy link
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants