Skip to content
Permalink
Browse files

arch: arc: the caculation of exception stack is wrong

after appling the new "_get_curr_cpu_irq_stack" in _exc_entry,
the caculation of exception stack is wrong, this will
cause stack overflow, make the exception handling corrupt.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
  • Loading branch information...
vonhust authored and ioannisg committed Aug 9, 2019
1 parent 5dd715b commit 075758389217cc8a440441115842f4c1cad53f2e
Showing with 2 additions and 2 deletions.
  1. +2 −2 arch/arc/core/fault_s.S
@@ -65,9 +65,9 @@ _exc_entry:
* and exception is raised, then here it's guaranteed that
* exception handling has necessary stack to use
*/
mov_s ilink, sp
mov ilink, sp
_get_curr_cpu_irq_stack sp
add sp, sp, EXCEPTION_STACK_SIZE
sub sp, sp, (CONFIG_ISR_STACK_SIZE - EXCEPTION_STACK_SIZE)

/*
* save caller saved registers

0 comments on commit 0757583

Please sign in to comment.
You can’t perform that action at this time.