debug: add stack sentinel feature

This places a sentinel value at the lowest 4 bytes of a stack
memory region and checks it at various intervals, including when
servicing interrupts or context switching.

This is implemented on all arches except ARC, which supports stack
bounds checking directly in hardware.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-05-11 13:29:15 -07:00 committed by Anas Nashif
commit 5dcb279df8
19 changed files with 162 additions and 19 deletions

View file

@ -31,6 +31,9 @@ extern void _update_time_slice_before_swap(void);
extern s32_t _ms_to_ticks(s32_t ms);
#endif
extern void idle(void *, void *, void *);
#ifdef CONFIG_STACK_SENTINEL
extern void _check_stack_sentinel(void);
#endif
/* find which one is the next thread to run */
/* must be called with interrupts locked */