bpo-42500: Fix recursion in or after except (GH-23568) (#24501)

* Use counter, rather boolean state when handling soft overflows.

(cherry picked from commit 4e7a69bdb6)
This commit is contained in:
Mark Shannon 2021-03-02 10:36:38 +00:00 committed by GitHub
parent f836e5f219
commit 8b795ab554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 76 additions and 75 deletions

View file

@ -576,7 +576,7 @@ new_threadstate(PyInterpreterState *interp, int init)
tstate->frame = NULL;
tstate->recursion_depth = 0;
tstate->overflowed = 0;
tstate->recursion_headroom = 0;
tstate->recursion_critical = 0;
tstate->stackcheck_counter = 0;
tstate->tracing = 0;