mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
GH-100126: Skip incomplete frames in more places (GH-100613)
This commit is contained in:
parent
2e80c2a976
commit
61762b9387
12 changed files with 62 additions and 46 deletions
|
|
@ -1302,10 +1302,7 @@ PyFrameObject*
|
|||
PyThreadState_GetFrame(PyThreadState *tstate)
|
||||
{
|
||||
assert(tstate != NULL);
|
||||
_PyInterpreterFrame *f = tstate->cframe->current_frame;
|
||||
while (f && _PyFrame_IsIncomplete(f)) {
|
||||
f = f->previous;
|
||||
}
|
||||
_PyInterpreterFrame *f = _PyThreadState_GetFrame(tstate);
|
||||
if (f == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1431,9 +1428,7 @@ _PyThread_CurrentFrames(void)
|
|||
PyThreadState *t;
|
||||
for (t = i->threads.head; t != NULL; t = t->next) {
|
||||
_PyInterpreterFrame *frame = t->cframe->current_frame;
|
||||
while (frame && _PyFrame_IsIncomplete(frame)) {
|
||||
frame = frame->previous;
|
||||
}
|
||||
frame = _PyFrame_GetFirstComplete(frame);
|
||||
if (frame == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue