summaryrefslogtreecommitdiff
path: root/esp8266/main.c
diff options
context:
space:
mode:
authorJosef Gajdusek <atx@atx.name>2015-05-06 14:34:32 +0200
committerDamien George <damien.p.george@gmail.com>2015-05-06 14:01:07 +0100
commit28076f3d4b3bf58aa86d6346af88665f7e5c6031 (patch)
tree4f77ce2f7411e5061c3485ef0abeeae8aacd781c /esp8266/main.c
parent9a42eb541eb426a04bb0541ccf0e26ce82bdcb22 (diff)
esp8266: Fix garbage collector by hard-coding stack end address.
As user_init() is not a true main functions, the stack pointer captured within is not pointing at the base of the stack. This caused gc_collect being called with sp being higher than stack_end, causing integer overflow and crashing as gc tried to scan almost the entire address space.
Diffstat (limited to 'esp8266/main.c')
-rw-r--r--esp8266/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index a3878c0e7..81618cd63 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -43,7 +43,6 @@ STATIC void mp_reset(void) {
mp_stack_set_limit(10240);
mp_hal_init();
gc_init(heap, heap + sizeof(heap));
- gc_collect_init();
mp_init();
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_init(mp_sys_argv, 0);