[issue25274] sys.setrecursionlimit() must fail if the current recursion depth is higher than the new low-water mark

STINNER Victor report at bugs.python.org
Fri Oct 2 00:03:54 CEST 2015


STINNER Victor added the comment:

> An alternative would be to remove completly the overflowed flag with its fatal error. It was introduced during large refactoring of Python, maybe the bug cannot occur anymore?

By the way, it doesn't exist in Python 2 at all. Try attached double_recursion_error.py program.


$ python2 double_recursion_error.py 
first recursion error
second recursion error


$ python3 double_recursion_error.py 
first recursion error
Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00007f80a6985700 (most recent call first):
  File "double_recursion_error.py", line 5 in f
  File "double_recursion_error.py", line 5 in f
  File "double_recursion_error.py", line 5 in f
  File "double_recursion_error.py", line 5 in f
  ...
Abandon (core dumped)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25274>
_______________________________________


More information about the Python-bugs-list mailing list