diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-12-10 20:13:36 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-12-10 20:13:36 -0800 |
| commit | 8a981dc8e86e077823b8b3ea2240306d8a736cac (patch) | |
| tree | 850096086dc5b9ac5010469c0a3175c0ff223966 /supervisor/shared/stack.h | |
| parent | 09316b35d7b838d735d76639cca462c088d3d18d (diff) | |
| parent | c3c600dfa3ddf6343e7b51a58669a3c3d3c5b58a (diff) | |
Merge remote-tracking branch 'adafruit/master' into sfe840
Diffstat (limited to 'supervisor/shared/stack.h')
| -rwxr-xr-x | supervisor/shared/stack.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/supervisor/shared/stack.h b/supervisor/shared/stack.h index 3a5c18e7d..1fb43be57 100755 --- a/supervisor/shared/stack.h +++ b/supervisor/shared/stack.h @@ -37,5 +37,12 @@ void stack_init(void); void stack_resize(void); void set_next_stack_size(uint32_t size); uint32_t get_current_stack_size(void); +bool stack_ok(void); + +// Use this after any calls into a library which may use a lot of stack. This will raise a Python +// exception when the stack has likely overwritten a portion of the heap. +void assert_heap_ok(void); + +#define STACK_CANARY_VALUE 0x017829ef #endif // MICROPY_INCLUDED_SUPERVISOR_STACK_H |
