mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
freerots: fix rtos_int_exit writing outside ISR stack
rtos_int_exit would store RA at an offset of 4 byte from the SP, where the offset should be 0. This caused rtos_int_exit to overwrite variables in bss.
This commit is contained in:
@@ -90,9 +90,9 @@ isr_skip_decrement:
|
||||
|
||||
/* preserve return address and schedule next task */
|
||||
addi sp,sp,-4
|
||||
sw ra, 0x04(sp)
|
||||
sw ra, 0(sp)
|
||||
call vTaskSwitchContext
|
||||
lw ra, 0x04(sp)
|
||||
lw ra, 0(sp)
|
||||
addi sp, sp, 4
|
||||
|
||||
/* Clears the switch pending flag */
|
||||
|
Reference in New Issue
Block a user