mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py/modthread: Initialise nlr_jump_callback_top on threads.
The main thread gets this because the thread state is in bss, but subsequent threads need this field to be initialised. Also added a note to mpstate.h to help avoid missing this in the future. Fixes issue #12695. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
e78471416b
commit
3883f29485
@@ -174,6 +174,7 @@ STATIC void *thread_entry(void *args_in) {
|
||||
// The GC starts off unlocked on this thread.
|
||||
ts.gc_lock_depth = 0;
|
||||
|
||||
ts.nlr_jump_callback_top = NULL;
|
||||
ts.mp_pending_exception = MP_OBJ_NULL;
|
||||
|
||||
// set locals and globals from the calling context
|
||||
|
||||
Reference in New Issue
Block a user