[issue32022] Python crashes with mutually recursive code

Terry J. Reedy report at bugs.python.org
Wed Nov 22 14:36:30 EST 2017


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I confirmed that increasing the recursion limit can change recursion behavior on Windows.

>>> def f(): g()
...
>>> def g(): f()
...
>>> f()

With the default limit or 1000 or increase to 3000, I get a recursion error.  With the limit set to 10000, I get 'MemoryError: stack overflow'.  It is not too surprising that the more complicated code prevents getting even that.

----------

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


More information about the Python-bugs-list mailing list