diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2023-10-17 12:27:49 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-10-18 09:18:23 +1100 |
| commit | 3883f29485fad21105f6f965d56bfec842b8cfbb (patch) | |
| tree | 9858f03d98f185ea7e8fcce0adaecb6da5da34cf /py/mpstate.h | |
| parent | e78471416bc77d5355e2181047e57f1e45d3654c (diff) | |
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>
Diffstat (limited to 'py/mpstate.h')
| -rw-r--r-- | py/mpstate.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 64915ab87..0e0388e41 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -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; |
