Browse Source
The call to invoke_irq_handler_run() always needs to run in a protected NLR
context, to catch exceptions from the Python handler, and the m_new's (and
also mp_local_alloc when PYSTACK is enabled). With
MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS_WITH_INTERLOCK enabled there was
already an explicit nlr_push, and that is now used in all cases.
Without this change, on stm32 (for example), the callbacks from the BLE
stack to invoke_irq_handler() were made via static scheduled nodes which do
not have any NLR protection, and hence would lead to a hard fault (uncaught
NLR) if an exception was raised in the Python BLE IRQ handler. This was a
regression introduced by 8045ac07f5
, which is
fixed by this commit.
Signed-off-by: Damien George <damien@micropython.org>
pull/9390/head
Damien George
2 years ago
1 changed files with 33 additions and 18 deletions
Loading…
Reference in new issue