diff options
author | Mark Shannon <mark@hotpy.org> | 2020-12-02 13:30:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 13:30:55 (GMT) |
commit | 4e7a69bdb63a104587759d7784124492dcdd496e (patch) | |
tree | 5477c7077970d9100d089286b75ce2ff408ac613 /Include/cpython | |
parent | 93a0ef76473683aa3ad215e11df18f7839488c4e (diff) | |
download | cpython-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.h | 3 |
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. |