bpo-40696: Fix a hang that can arise after gen.throw() by cjerdonek · Pull Request #20287 · python/cpython

added 2 commits

May 21, 2020 01:18

@cjerdonek cjerdonek changed the title [WIP] bpo-40696: Fix a hang that can arise after gen.throw() bpo-40696: Fix a hang that can arise after gen.throw()

May 21, 2020

@cjerdonek

@cjerdonek

1st1

1st1

1st1

1st1

1st1

@cjerdonek

1st1

1st1 approved these changes May 22, 2020

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

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 <chris.jerdonek@gmail.com>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

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 <chris.jerdonek@gmail.com>

cjerdonek added a commit that referenced this pull request

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 <chris.jerdonek@gmail.com>

arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request

May 24, 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.