mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
GH-96754: Check whether the interpreter frame is complete before creating frame object. (GH-96776)
This commit is contained in:
parent
1756ffd66a
commit
12c5f328d2
4 changed files with 14 additions and 3 deletions
|
@ -1406,6 +1406,9 @@ _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;
|
||||
}
|
||||
if (frame == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue