New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack overflow after hitting recursion limit twice #49642
Comments
Set sys.setrecursionlimit to 50 or lower. Then, the second time the Python 3.1a0 (py3k, Feb 28 2009, 04:16:04) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
p3> import sys
p3> sys.setrecursionlimit(20)
p3> def g(): g()
...
p3> g()
Traceback (most recent call last):
...
RuntimeError: maximum recursion depth exceeded
p3> g()
Fatal Python error: Cannot recover from stack overflow. This application has requested the Runtime to terminate it in an C:\APPS\python\py3k\PCbuild> |
I can reproduce that (with the same limits) on Linux here. (Although it is technically not a crash but a controlled abort().) |
This is probably due to the recursion overflow recovery code in py3k, (is setting the recursion limit so low a requirement for your |
It is an artificial value, I don't require a recursion |
The fact it fails only the second time is by design, although I'm not We could probably make the recovery detection smarter. |
Here is a patch. I've put the tests in test_sys.py, I haven't found a |
It helped me debug a number of interpreter crashes in 3.0. When a stack |
Committed in r70344. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: