summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-10-22 17:57:28 -0700
committerScott Shawcroft <scott@tannewt.org>2018-12-04 23:26:04 -0800
commit7ad2e6ace34a6d417ec1b84472fa409d5451137b (patch)
tree57e75e8a4759607f2efce0e032c13d81b2c38e0e /main.c
parent4b5edd3c03623aa09043d337e69efa4e384cf0a4 (diff)
Add stack validity check and raise an error when it happens.
The backtrace cannot be given because it relies on the validity of the qstr data structures on the heap which may have been corrupted. In fact, it still can crash hard when the bytecode itself is overwritten. To fix, we'd need a way to skip gathering the backtrace completely. This also increases the default stack size on M4s so it can accomodate the stack needed by ASF4s nvm API.
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 974f045fa..00babd20c 100755
--- a/main.c
+++ b/main.c
@@ -220,8 +220,8 @@ bool run_code_py(safe_mode_t safe_mode) {
rgb_status_animation_t animation;
prep_rgb_status_animation(&result, found_main, safe_mode, &animation);
while (true) {
- #ifdef MICROPY_VM_HOOK_LOOP
- MICROPY_VM_HOOK_LOOP
+ #ifdef CIRCUITPY_SUPERVISOR_BACKGROUND
+ CIRCUITPY_SUPERVISOR_BACKGROUND
#endif
if (reload_requested) {
return true;