projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff3a2de
)
altos/stm: Fix stack validation code
author
Keith Packard
<keithp@keithp.com>
Sat, 8 Aug 2020 03:08:34 +0000
(20:08 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sat, 8 Aug 2020 03:30:11 +0000
(20:30 -0700)
This is not included by default, and broke at some point.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_arch_funcs.h
patch
|
blob
|
history
diff --git
a/src/stm/ao_arch_funcs.h
b/src/stm/ao_arch_funcs.h
index 8f4f6cd4ce9e70658a64a352ab81b7a3ca015df2..083f7a2beb7ad394e57c200d9b1f13dd2ff5f020 100644
(file)
--- a/
src/stm/ao_arch_funcs.h
+++ b/
src/stm/ao_arch_funcs.h
@@
-562,8
+562,8
@@
ao_validate_cur_stack(void)
asm("mrs %0,psp" : "=&r" (psp));
if (ao_cur_task &&
- psp <= ao_cur_task->stack &&
-
psp >= ao_cur_task->stack - 256
)
+ (psp <= ao_cur_task->stack8 ||
+
psp >= ao_cur_task->stack8 + AO_STACK_SIZE)
)
ao_panic(AO_PANIC_STACK);
}
#endif