[issue44393] segfault with sys.setrecursionlimit

2021-07-28 Thread Jack DeVries


Jack DeVries  added the comment:

What about low recursion limits? This program causes a segfault for me::

import sys
sys.setrecursionlimit(4)

print('goodbye, world')

--
nosy: +jack__d

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

That's the documented behavior: "A user may need to set the limit higher when 
they have a program that requires deep recursion and a platform that supports a 
higher limit. This should be done with care, because a too-high limit can lead 
to a crash."

https://docs.python.org/3.8/library/sys.html#sys.setrecursionlimit

Also, please don't post images. Copy and paste the text instead. Images aren't 
friendly to visually impaired people, and they can't be copy and pasted.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Alex Hall


New submission from Alex Hall :

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(100)
```

--
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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com