summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2020-12-02 13:30:55 (GMT)
committerGitHub <noreply@github.com>2020-12-02 13:30:55 (GMT)
commit4e7a69bdb63a104587759d7784124492dcdd496e (patch)
tree5477c7077970d9100d089286b75ce2ff408ac613 /Include/cpython
parent93a0ef76473683aa3ad215e11df18f7839488c4e (diff)
downloadcpython-4e7a69bdb63a104587759d7784124492dcdd496e.zip
cpython-4e7a69bdb63a104587759d7784124492dcdd496e.tar.gz
cpython-4e7a69bdb63a104587759d7784124492dcdd496e.tar.bz2
bpo-42500: Fix recursion in or after except (GH-23568)
* Use counter, rather boolean state when handling soft overflows.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/pystate.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h
index 0e6cc29..cfaee89 100644
--- a/Include/cpython/pystate.h
+++ b/Include/cpython/pystate.h
@@ -54,8 +54,7 @@ struct _ts {
/* Borrowed reference to the current frame (it can be NULL) */
PyFrameObject *frame;
int recursion_depth;
- char overflowed; /* The stack has overflowed. Allow 50 more calls
- to handle the runtime error. */
+ int recursion_headroom; /* Allow 50 more calls to handle any errors. */
int stackcheck_counter;
/* 'tracing' keeps track of the execution depth when tracing/profiling.