mirror of
https://github.com/python/cpython.git
synced 2025-09-15 13:16:12 +00:00
GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510)
This commit is contained in:
parent
0ff8fd6583
commit
76449350b3
22 changed files with 165 additions and 99 deletions
|
@ -1218,7 +1218,7 @@ sys_setrecursionlimit_impl(PyObject *module, int new_limit)
|
|||
|
||||
/* Reject too low new limit if the current recursion depth is higher than
|
||||
the new low-water mark. */
|
||||
int depth = tstate->recursion_limit - tstate->recursion_remaining;
|
||||
int depth = tstate->py_recursion_limit - tstate->py_recursion_remaining;
|
||||
if (depth >= new_limit) {
|
||||
_PyErr_Format(tstate, PyExc_RecursionError,
|
||||
"cannot set the recursion limit to %i at "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue