|
@@ -15,6 +15,10 @@ void py_BaseException__stpush(py_Frame* frame,
|
|
|
int max_frame_dumps = py_debugger_status() == 1 ? 31 : 7;
|
|
int max_frame_dumps = py_debugger_status() == 1 ? 31 : 7;
|
|
|
if(ud->stacktrace.length >= max_frame_dumps) return;
|
|
if(ud->stacktrace.length >= max_frame_dumps) return;
|
|
|
BaseExceptionFrame* frame_dump = c11_vector__emplace(&ud->stacktrace);
|
|
BaseExceptionFrame* frame_dump = c11_vector__emplace(&ud->stacktrace);
|
|
|
|
|
+ // `locals` and `globals` are only filled in when the debugger is attached, but the GC
|
|
|
|
|
+ // walks them unconditionally; nil them out before anything below can allocate
|
|
|
|
|
+ py_newnil(&frame_dump->locals);
|
|
|
|
|
+ py_newnil(&frame_dump->globals);
|
|
|
PK_INCREF(src);
|
|
PK_INCREF(src);
|
|
|
frame_dump->src = src;
|
|
frame_dump->src = src;
|
|
|
frame_dump->lineno = lineno;
|
|
frame_dump->lineno = lineno;
|