diff options
| author | TG-Techie <39284876+TG-Techie@users.noreply.github.com> | 2020-02-28 02:54:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-28 02:54:41 -0500 |
| commit | 75aea6b1ca3b2d9a14ea195ee3b1e23101b4cc77 (patch) | |
| tree | b49e33ff7aac96ae800575e870b3828f82bece58 /supervisor/shared/stack.c | |
| parent | c000567d880b054ca9ed0e9f96ee474451e92e3c (diff) | |
| parent | 1b33cd11fc788bd6b45b54c5629a3b98a92efc2a (diff) | |
Merge pull request #1 from adafruit/master
add in 5.0rc changes
Diffstat (limited to 'supervisor/shared/stack.c')
| -rwxr-xr-x | supervisor/shared/stack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/supervisor/shared/stack.c b/supervisor/shared/stack.c index dcecf2067..2b7b1c03a 100755 --- a/supervisor/shared/stack.c +++ b/supervisor/shared/stack.c @@ -46,6 +46,10 @@ void allocate_stack(void) { mp_uint_t c_size = (uint32_t) port_stack_get_top() - sp; + if (port_stack_get_top() != port_heap_get_top()) { + return; + } + stack_alloc = allocate_memory(c_size + next_stack_size + EXCEPTION_STACK_SIZE, true); if (stack_alloc == NULL) { stack_alloc = allocate_memory(c_size + CIRCUITPY_DEFAULT_STACK_SIZE + EXCEPTION_STACK_SIZE, true); @@ -71,6 +75,9 @@ void stack_init(void) { } void stack_resize(void) { + if (stack_alloc == NULL) { + return; + } if (next_stack_size == current_stack_size) { *stack_alloc->ptr = STACK_CANARY_VALUE; return; |
