summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-10-05 00:34:03 (GMT)
committerGitHub <noreply@github.com>2022-10-05 00:34:03 (GMT)
commit76449350b3467b85bcb565f9e2bf945bd150a66e (patch)
treee4237841cdb9d9984e3249823a8518c79470d73f /Python/pystate.c
parent0ff8fd65838f9f9ed90d7a055d26a2ce9fc0ce85 (diff)
downloadcpython-76449350b3467b85bcb565f9e2bf945bd150a66e.zip
cpython-76449350b3467b85bcb565f9e2bf945bd150a66e.tar.gz
cpython-76449350b3467b85bcb565f9e2bf945bd150a66e.tar.bz2
GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510)
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 23e9d24..50ae0ce 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -792,8 +792,9 @@ init_threadstate(PyThreadState *tstate,
tstate->native_thread_id = PyThread_get_thread_native_id();
#endif
- tstate->recursion_limit = interp->ceval.recursion_limit,
- tstate->recursion_remaining = interp->ceval.recursion_limit,
+ tstate->py_recursion_limit = interp->ceval.recursion_limit,
+ tstate->py_recursion_remaining = interp->ceval.recursion_limit,
+ tstate->c_recursion_remaining = C_RECURSION_LIMIT;
tstate->exc_info = &tstate->exc_state;