summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.h')
-rw-r--r--py/runtime.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h
index a93488e2cd..f42039cab9 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -169,6 +169,12 @@ static inline void mp_thread_init_state(mp_state_thread_t *ts, size_t stack_size
ts->nlr_jump_callback_top = NULL;
ts->mp_pending_exception = MP_OBJ_NULL;
+ #if MICROPY_PY_SYS_SETTRACE
+ ts->prof_trace_callback = MP_OBJ_NULL;
+ ts->prof_callback_is_executing = false;
+ ts->current_code_state = NULL;
+ #endif
+
// If locals/globals are not given, inherit from main thread
if (locals == NULL) {
locals = mp_state_ctx.thread.dict_locals;