diff options
| author | Frédéric Desbiens <[email protected]> | 2026-09-03 14:17:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-09-03 14:17:49 -0400 |
| commit | d7789f0b1261fe897e2cdc5a525cfa06011dd35f (patch) | |
| tree | b098e91e54964c1905c8e20c217f146145dd3926 /common_modules/module_manager/src | |
| parent | 508af549dae1c269088b8e02c45670bf87de33b1 (diff) | |
Fixed the clobbered return address in the RISC-V context save (#696)
_tx_thread_context_save() returns to its caller with ret, which uses the
return address held in ra. When TX_ENABLE_EXECUTION_CHANGE_NOTIFY was
defined, the call to _tx_execution_isr_enter overwrote ra with the address
of the instruction following the call, so the subsequent ret returned into
_tx_thread_context_save itself instead of the interrupt service routine.
The return address is now saved on the stack around the call and recovered
afterwards, which is the same idiom already used by the Arm ports. The fix
covers all three affected paths (nested save, thread save and idle system
save) in the risc-v32 GNU, risc-v32 IAR and risc-v64 GNU ports.
Fixes #348
Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager/src')
0 files changed, 0 insertions, 0 deletions
