diff options
author | Damien George <damien@micropython.org> | 2022-09-23 14:20:37 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-09-23 15:21:54 +1000 |
commit | f2ad152e7e04608cbf57d756f6a4cebbf9976f6c (patch) | |
tree | 6c9b1f1e67eb6589396f6e54165417e5f2808d87 /docs/esp8266 | |
parent | db668742a5986ab1de9c0474ef268c00fb1879e7 (diff) |
extmod/modbluetooth: Run BLE IRQ callback in protected NLR context.
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>
Diffstat (limited to 'docs/esp8266')
0 files changed, 0 insertions, 0 deletions