-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
GH-95818: Skip incomplete frames in PyThreadState_GetFrame
#95886
GH-95818: Skip incomplete frames in PyThreadState_GetFrame
#95886
Conversation
markshannon
commented
Aug 11, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Weird test failures related to tracebacks #95818
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Is previous
guaranteed to be initialized in an incomplete frame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. A _PyInterpreterFrame
is never incomplete in the sense that it is partially initialized. "Incomplete" just means that the resulting frame object wouldn't be valid because stuff like MAKE_CELL
hasn't run yet (or we just want to hide the frame).
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-95890 is a backport of this pull request to the 3.11 branch. |
…ythonGH-95886) (cherry picked from commit 1b46d11) Co-authored-by: Mark Shannon <mark@hotpy.org>