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
PyOS_CheckStack does not work #48246
Comments
On Windows, PyOS_CheckStack is supposed to protect the interpreter from The reason is a bad check of the return value of _resetstkoflw(): The patch below is enough to replace the "Fatal Python error: Could not Tested with:
>>> loop = None,
>>> for x in xrange(100000): loop = {'x': loop}
...
>>> len(repr(loop)) Index: Python/pythonrun.c --- Python/pythonrun.c (revision 66486)
+++ Python/pythonrun.c (working copy)
@@ -1749,7 +1755,7 @@
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH) {
int errcode = _resetstkoflw();
- if (errcode)
+ if (errcode == 0)
{
Py_FatalError("Could not reset the stack!");
} |
This issue may be related: bpo-1069092 |
Yes, bpo-1069092 is another case where PyOS_CheckStack is exercised. |
See also issue bpo-3999: I wrote a new generic handler for stack |
The patch is fine, please apply it to all versions from 2.6 to 3.0. |
Committed r67343 (trunk) and r67344 (release26-maint) |
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: