mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Issue #3697: "Fatal Python error: Cannot recover from stack overflow"
could be easily encountered under Windows in debug mode when exercising the recursion limit checking code, due to bogus handling of recursion limit when USE_STACKCHEK was enabled. Reviewed by Amaury Forgeot d'Arc on IRC.
This commit is contained in:
parent
338f5786ea
commit
658fad8aae
3 changed files with 49 additions and 8 deletions
|
@ -471,6 +471,7 @@ _Py_CheckRecursiveCall(char *where)
|
|||
return -1;
|
||||
}
|
||||
#endif
|
||||
_Py_CheckRecursionLimit = recursion_limit;
|
||||
if (tstate->recursion_critical)
|
||||
/* Somebody asked that we don't check for recursion. */
|
||||
return 0;
|
||||
|
@ -489,7 +490,6 @@ _Py_CheckRecursiveCall(char *where)
|
|||
where);
|
||||
return -1;
|
||||
}
|
||||
_Py_CheckRecursionLimit = recursion_limit;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue