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
Generator functions stack overflow #79535
Comments
Gоt |
I think I have seen this bug reported elsewhere but can't find it now. A simple reproducer : def foo():
try:
raise Exception()
except:
foo()
foo() Running under gdb on Ubuntu : Program received signal SIGABRT, Aborted. |
How did you make a recursive generator? The 'yield' would have paused execution. Do you have code you can share to reproduce? Otherwise blowing your stack out is normal behaviour in a function which you can deal with by lowering your stack depth with sys.setrecursionlimit() to one that will raise RecursionError before you blow your stack. |
Brett, the user had an invalid email address in their profile thus adding comments to the issue caused a server error while sending notification to them. So they have been removed from the issue. Please see : https://python.zulipchat.com/#narrow/stream/116501-workflow/subject/Is.20adding.20comment.20in.20bpo.20broken.20for.20anyone.3F/near/148846056 As for the issue OP attached a reproducer where they produce NameError with the "new" variable which is not defined in the try block and catch the exception to make recursive calls in https://bugs.python.org/file47958/crash.py |
I'm closing this as a duplicate of https://bugs.python.org/issue6028 Making a recursive call in an except block cannot be handled sensibly by the interpreter. On exceeding the stack depth, the interpreter will raise a RecursionError. |
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: