mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +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
@@ -249,8 +249,10 @@ typedef struct _mp_state_vm_t {
|
||||
#endif
|
||||
} mp_state_vm_t;
|
||||
|
||||
// This structure holds state that is specific to a given thread.
|
||||
// Everything in this structure is scanned for root pointers.
|
||||
// This structure holds state that is specific to a given thread. Everything
|
||||
// in this structure is scanned for root pointers. Anything added to this
|
||||
// structure must have corresponding initialisation added to thread_entry (in
|
||||
// py/modthread.c).
|
||||
typedef struct _mp_state_thread_t {
|
||||
// Stack top at the start of program
|
||||
char *stack_top;
|
||||
|
||||
Reference in New Issue
Block a user