[New-bugs-announce] [issue44393] segfault with sys.setrecursionlimit

Alex Hall report at bugs.python.org
Fri Jun 11 05:27:01 EDT 2021


New submission from Alex Hall <bearodark at gmail.com>:

Found on:
Python 3.9.5
GCC 11.1 on Linux (x86_64)
Reproduced on:
Python 3.9.5
Clang 9.0.8 Linux (arm)

When setting the recursion limit to a high enough amount, trying to reach that recursion limit ends in a segmentation fault (stack overflow?)

code:
```py
import sys

def recurse(n: int) -> int:
    recurse(n)

sys.setrecursionlimit(2**16-1)

recurse(1000000)
```

----------
components: Library (Lib)
files: segpy.png
messages: 395626
nosy: ultrabear
priority: normal
severity: normal
status: open
title: segfault with sys.setrecursionlimit
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50104/segpy.png

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


More information about the New-bugs-announce mailing list