GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)

Add new frame owner type for interpreter entry frames
This commit is contained in:
Mark Shannon 2025-01-21 10:15:02 +00:00 committed by GitHub
parent d3b1bb228c
commit f5b6356a11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 33 additions and 48 deletions

View file

@ -890,7 +890,7 @@ done:
static void
dump_frame(int fd, _PyInterpreterFrame *frame)
{
assert(frame->owner != FRAME_OWNED_BY_CSTACK);
assert(frame->owner < FRAME_OWNED_BY_INTERPRETER);
PyCodeObject *code =_PyFrame_GetCode(frame);
PUTS(fd, " File ");
@ -965,7 +965,7 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
unsigned int depth = 0;
while (1) {
if (frame->owner == FRAME_OWNED_BY_CSTACK) {
if (frame->owner == FRAME_OWNED_BY_INTERPRETER) {
/* Trampoline frame */
frame = frame->previous;
if (frame == NULL) {
@ -973,7 +973,7 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
}
/* Can't have more than one shim frame in a row */
assert(frame->owner != FRAME_OWNED_BY_CSTACK);
assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
}
if (MAX_FRAME_DEPTH <= depth) {