summaryrefslogtreecommitdiff
path: root/supervisor/shared/stack.h
diff options
context:
space:
mode:
authorJuan Biondi <juanernestobiondi@gmail.com>2018-12-12 21:05:16 +0100
committerGitHub <noreply@github.com>2018-12-12 21:05:16 +0100
commit749b2b0aacffb0dc3445699ef5251cee723160ff (patch)
treef447fdb6cf42a14596a9f75a584fb4c600cc8e70 /supervisor/shared/stack.h
parente766f6e4ad827ce2021978d5a4a688bb73fd11e2 (diff)
parent6773fe6a422343496a0ce6bbb8eca08d65eb7d3e (diff)
Merge pull request #2 from adafruit/master
Get latest
Diffstat (limited to 'supervisor/shared/stack.h')
-rwxr-xr-xsupervisor/shared/stack.h7
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