Skip to content

faulthandler's dump_traceback doesn't handle case where top-most frame is FRAME_OWNED_BY_CSTACK #123967

Closed
@colesbury

Description

@colesbury

Bug report

We properly skip trampoline frames when they are not the top-most frame:

cpython/Python/traceback.c

Lines 979 to 982 in 3bd942f

if (frame->owner == FRAME_OWNED_BY_CSTACK) {
/* Trampoline frame */
frame = frame->previous;
}

But if tstate->current_frame is a trampoline frame (i.e., FRAME_OWNED_BY_CSTACK) then dump_traceback will crash if faulthandler is triggered when executing a trampoline frame.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions