Skip to content
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

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

Open
colesbury opened this issue Sep 11, 2024 · 0 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes type-bug An unexpected behavior, bug, or error

Comments

@colesbury
Copy link
Contributor

colesbury commented Sep 11, 2024

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.

@colesbury colesbury added type-bug An unexpected behavior, bug, or error 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant