You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently, Cortex-M has a bug in error reporting of Stacking Errors that are not, additionally, Data Access Violation Errors. The utility macro, IS_MPU_GUARD_VIOLATION(), implements the wrong logic wrt the input fault_addr (faulting address).
To Reproduce
To reproduce this, we need to trigger a Stacking error that is not, additionally, a MemManage Data Access Violation Error (to do that we need to make sure that the stack overflow occurs because the CPU tries to stack an exception frame and exactly this operation results in overflow). The Cortex-M fault mechanism will assert, complaining that the Stacking error is not due to a stack overflow.
Expected behavior
We expect the Cortex-M Core fault handing mechanism to not Assert when parsing processor memory violation faults.
Impact
Medium severity. There is definitely an error in the fault handing logic. Stack overflows are never missed (so it is not a very critical bug), however, the processor Asserts inside the fault handler. Only affects ARMv7-M architecture with HW_STACK_PROTECTION enabled.
Screenshots or console output
See #25348 , this contains an error log showing the assert statement being hit.
Additional context
Needs backporting to LTS.
Needs test coverage
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, Cortex-M has a bug in error reporting of Stacking Errors that are not, additionally, Data Access Violation Errors. The utility macro,
IS_MPU_GUARD_VIOLATION()
, implements the wrong logic wrt the inputfault_addr
(faulting address).To Reproduce
To reproduce this, we need to trigger a Stacking error that is not, additionally, a MemManage Data Access Violation Error (to do that we need to make sure that the stack overflow occurs because the CPU tries to stack an exception frame and exactly this operation results in overflow). The Cortex-M fault mechanism will assert, complaining that the Stacking error is not due to a stack overflow.
Expected behavior
We expect the Cortex-M Core fault handing mechanism to not Assert when parsing processor memory violation faults.
Impact
Medium severity. There is definitely an error in the fault handing logic. Stack overflows are never missed (so it is not a very critical bug), however, the processor Asserts inside the fault handler. Only affects ARMv7-M architecture with HW_STACK_PROTECTION enabled.
Screenshots or console output
See #25348 , this contains an error log showing the assert statement being hit.
Additional context
The text was updated successfully, but these errors were encountered: