f2ad152e7e
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 8045ac07f599c0ccc447c88a0b778f704b497559, which is fixed by this commit. Signed-off-by: Damien George <damien@micropython.org>