You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segfault in 3.13 when calling PyEval_SetTrace from a thread with no Python frames #121814
This reproducer enters _PyEval_SetTrace with no Python frames on the stack, and so PyEval_GetFrame returns a null pointer and frame->f_trace_opcodes dereferences it. It seems that this needs to be guarded:
PyFrameObject*frame=PyEval_GetFrame();
if (frame&&frame->f_trace_opcodes) {
Activity
gaogaotiantian commentedon Jul 15, 2024
Thanks, this was my fault and I'll fix this with you as co-author.
gh-121814: Only check f_trace_opcodes if Python frame exists (#121818)
gaogaotiantian commentedon Jul 15, 2024
Fixed in #121818.
pablogsal commentedon Jul 16, 2024
@gaogaotiantian this needs to be backported to 3.13
pythongh-121814: Only check f_trace_opcodes if Python frame exists (p…
[3.13] gh-121814: Only check f_trace_opcodes if Python frame exists (G…
gaogaotiantian commentedon Jul 16, 2024
Backported in #121861.
pythongh-121814: Only check f_trace_opcodes if Python frame exists (p…