summaryrefslogtreecommitdiff
path: root/extmod/modbluetooth.c
diff options
context:
space:
mode:
authorDaniël van de Giessen <daniel@dvdgiessen.nl>2023-10-30 15:25:38 +0100
committerDamien George <damien@micropython.org>2023-11-09 14:51:20 +1100
commit3b954698fa036ab34fe578ce46ff9fa5cf6ca4ce (patch)
tree5e57b26957c9e2bb35bdfcc73f96c6b3f306c0d9 /extmod/modbluetooth.c
parentaf52e1ff24b0b543f6fdb3bc937713a6ab94d506 (diff)
extmod/modbluetooth: Initialise nlr_jump_callback_top for IRQ handlers.
Similar to 3883f29485fad21105f6f965d56bfec842b8cfbb where this change was implemented for threads: when the Bluetooth IRQ handler is called the thread state is not not zero-initialized and thus we need to manually set this to NULL. Fixes issue #12239. Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
Diffstat (limited to 'extmod/modbluetooth.c')
-rw-r--r--extmod/modbluetooth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/extmod/modbluetooth.c b/extmod/modbluetooth.c
index 3417df7a2..cef5151cc 100644
--- a/extmod/modbluetooth.c
+++ b/extmod/modbluetooth.c
@@ -1276,6 +1276,7 @@ STATIC mp_obj_t invoke_irq_handler(uint16_t event,
mp_stack_set_top(&ts + 1); // need to include ts in root-pointer scan
mp_stack_set_limit(MICROPY_PY_BLUETOOTH_SYNC_EVENT_STACK_SIZE - 1024);
ts.gc_lock_depth = 0;
+ ts.nlr_jump_callback_top = NULL;
ts.mp_pending_exception = MP_OBJ_NULL;
mp_locals_set(mp_state_ctx.thread.dict_locals); // set from the outer context
mp_globals_set(mp_state_ctx.thread.dict_globals); // set from the outer context