diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2023-01-09 20:20:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 20:20:04 (GMT) |
commit | 61762b93871419b34f02d83cee5ca0d94d4a2903 (patch) | |
tree | 286b9aff961b5435e2d34894857a603ae86aa5c6 /Python/frame.c | |
parent | 2e80c2a976c13dcb69a654b386164dca362295a3 (diff) | |
download | cpython-61762b93871419b34f02d83cee5ca0d94d4a2903.zip cpython-61762b93871419b34f02d83cee5ca0d94d4a2903.tar.gz cpython-61762b93871419b34f02d83cee5ca0d94d4a2903.tar.bz2 |
GH-100126: Skip incomplete frames in more places (GH-100613)
Diffstat (limited to 'Python/frame.c')
-rw-r--r-- | Python/frame.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/frame.c b/Python/frame.c index b1525cc..6a287d4 100644 --- a/Python/frame.c +++ b/Python/frame.c @@ -96,10 +96,7 @@ take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame) } assert(!_PyFrame_IsIncomplete(frame)); assert(f->f_back == NULL); - _PyInterpreterFrame *prev = frame->previous; - while (prev && _PyFrame_IsIncomplete(prev)) { - prev = prev->previous; - } + _PyInterpreterFrame *prev = _PyFrame_GetFirstComplete(frame->previous); frame->previous = NULL; if (prev) { assert(prev->owner != FRAME_OWNED_BY_CSTACK); |