[issue25782] CPython hangs on error __context__ set to the error itself

Irit Katriel report at bugs.python.org
Sun Aug 8 14:13:55 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

> My argument is the loop creation should be prevented at first place.

I agree, but avoiding the hang is higher priority.

> Preventing creation of the loop will fix all other code that iterate the __context__ chain.

There could still be a cycles involving both __context__ and __cause__ links. This is why the traceback code uses a visited set to detect cycles.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25782>
_______________________________________


More information about the Python-bugs-list mailing list