Skip to content

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

Closed

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.12only security fixes
    3.13only security fixes
    3.14bugs and security fixes
    on Sep 11, 2024
  2. added a commit that references this issue on Nov 27, 2024
  3. added a commit that references this issue on Nov 27, 2024
  4. added a commit that references this issue on Nov 28, 2024
  5. added 2 commits that reference this issue on Nov 28, 2024
  6. picnixz commented on Nov 30, 2024

    @picnixz
    Member

    Closing since completed and backported.

  7. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13only 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