From bbad6ec9829605fdbd50119f9fed2c1efefe7743 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 23 Feb 2018 13:49:32 +0000 Subject: [PATCH] debug: stack: fix stack dump lower limit. Don't try and dump data outside of the stack. Signed-off-by: Liam Girdwood --- src/include/reef/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h index 9ffc6a89c..6554a5122 100644 --- a/src/include/reef/debug.h +++ b/src/include/reef/debug.h @@ -133,7 +133,7 @@ static inline void dump_stack(uint32_t p, void *addr, size_t offset, { extern void *__stack; extern void *_stack_sentry; - void *stack_bottom = (void *)&__stack; + void *stack_bottom = (void *)&__stack - sizeof(void *); void *stack_limit = (void *)&_stack_sentry; void *stack_top = arch_get_stack_ptr() + offset; size_t size = stack_bottom - stack_top;