[issue44790] Recursion causes Crash

2021-07-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: Indeed, this behavior is documented at https://docs.python.org/3/library/sys.html?highlight=setrecursionlimit#sys.setrecursionlimit : "a too-high limit can lead to a crash". I'd recommend refactoring to use iteration rather than recursion: def fact(n):

[issue44790] Recursion causes Crash

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: Also, see related: bpo-44393 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44790] Recursion causes Crash

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: The default recursion limit is 1,000; you're increasing it by a factor of 10. It is documented that raising the recursion limit can cause crashes. What kind of crash are you seeing? Segmentation fault or stack overflow? Also, provide more details about your

[issue44790] Recursion causes Crash

2021-07-30 Thread Michael Wang
New submission from Michael Wang : Ultimately it seems that deep recursion after setting the recursion limit actually crashes python -- components: Interpreter Core files: bug.py messages: 398619 nosy: michaeljwang10 priority: normal severity: normal status: open title: Recursion