Description
Description
- Type: Bug
- Priority: Minor
Bug
Target
K64F
Toolchain:
IAR
Toolchain version:
7.80
mbed-cli version:
1.0.0
meed-os sha:
a1c0840 (HEAD, tag: mbed_lib_rev129, tag: mbed-os-5.2.2) Merge pull request #3227 from ARMmbed/release-candidate
DAPLink version:
0242
Expected behavior
Ethernet driver IRQ handlers (ENET_Transmit_IRQHandler
, ENET_Receive_IRQHandler
or ENET_Error_IRQHandler
) should not get called when s_ENETHandle[0]
is null.
Actual behavior
It seems that there is a small time window in ENET_Init
where interrupts are enabled but the instance handle has not been added to s_ENETHandle
resulting in null pointer usage in the interrupt handles in case an interrupt happens within this time window.
Steps to reproduce
- Debug mbed-os-example-sockets using IAR
- Run -> observe that example works correctly
- Reset (Software reset by default)
- Run -> observe that hardfault happens
In step 3. if one does hardware reset instead of software, the example works correctly.