-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-95818: Skip incomplete frames in PyThreadState_GetFrame
#95886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
13825a1
e42f6fd
229f671
865e06e
ffbbdaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Skip over incomplete frames in :c:func:`PyThreadState_GetFrame`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1255,10 +1255,14 @@ PyFrameObject* | |
PyThreadState_GetFrame(PyThreadState *tstate) | ||
{ | ||
assert(tstate != NULL); | ||
if (tstate->cframe->current_frame == NULL) { | ||
_PyInterpreterFrame *f = tstate->cframe->current_frame; | ||
while (f && _PyFrame_IsIncomplete(f)) { | ||
f = f->previous; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. A |
||
} | ||
if (f == NULL) { | ||
return NULL; | ||
} | ||
PyFrameObject *frame = _PyFrame_GetFrameObject(tstate->cframe->current_frame); | ||
PyFrameObject *frame = _PyFrame_GetFrameObject(f); | ||
if (frame == NULL) { | ||
PyErr_Clear(); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.