-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Segfault in 3.13 when calling PyEval_SetTrace
from a thread with no Python frames
#121814
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
Labels
type-bug
An unexpected behavior, bug, or error
Comments
Thanks, this was my fault and I'll fix this with you as co-author. |
gaogaotiantian
added a commit
that referenced
this issue
Jul 15, 2024
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
Fixed in #121818. |
@gaogaotiantian this needs to be backported to 3.13 |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 16, 2024
…ythonGH-121818) (cherry picked from commit 2b1b689) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
Backported in #121861. |
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
…ython#121818) Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Given a
setup.py
with:and a
testext.cpp
with:doing:
gives a segmentation fault, because of this code in
_PyEval_SetTrace
:cpython/Python/legacy_tracing.c
Lines 607 to 608 in 7b41395
This reproducer enters
_PyEval_SetTrace
with no Python frames on the stack, and soPyEval_GetFrame
returns a null pointer andframe->f_trace_opcodes
dereferences it. It seems that this needs to be guarded:CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: