tests: fatal: allocate timer outside of stack
In stack_sentinel_timer(), the timer should not be allocated on the stack. If it gets added to the list of timeouts by k_timer_start, then an unexpected exception may occur when the timer expires since it may have been overwritten. Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
parent
2d8d4e0b1b
commit
d2edfa2347
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ void stack_sentinel_timer(void)
|
||||||
* k_timer and spin until we die. Spinning alone won't work
|
* k_timer and spin until we die. Spinning alone won't work
|
||||||
* on a tickless kernel.
|
* on a tickless kernel.
|
||||||
*/
|
*/
|
||||||
struct k_timer timer;
|
static struct k_timer timer;
|
||||||
|
|
||||||
blow_up_stack();
|
blow_up_stack();
|
||||||
k_timer_init(&timer, NULL, NULL);
|
k_timer_init(&timer, NULL, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue