From 54cb63863f19a7c64d9a3a5fd97bdfc0dd7ab374 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 10 Jun 2021 08:46:59 +0100 Subject: bpo-44348: Move trace-info to thread-state (GH-26623) * Move trace-info to thread state. * Correct output for pdb when turning on tracing in middle of line --- Python/pystate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 4a3cb24a19..a94a615f39 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -688,6 +688,8 @@ new_threadstate(PyInterpreterState *interp, int init) /* If top points to entry 0, then _PyThreadState_PopLocals will try to pop this chunk */ tstate->datastack_top = &tstate->datastack_chunk->data[1]; tstate->datastack_limit = (PyObject **)(((char *)tstate->datastack_chunk) + DATA_STACK_CHUNK_SIZE); + /* Mark trace_info as uninitialized */ + tstate->trace_info.code = NULL; if (init) { _PyThreadState_Init(tstate); -- cgit v1.2.1