diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-01-29 01:05:53 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-01-29 02:13:42 +0200 |
commit | d3b1f0b627ccc6705d9fe958549badb87a74ded1 (patch) | |
tree | ccc7d03e2f5cd00bb022f70093ca99915715ba42 /py/runtime.c | |
parent | 850212203a97754bdaf1844b71c8fe8ee905236f (diff) |
py/runtime: mp_stack_ctrl_init() should be called immediately on startup.
Calling it from mp_init() is too late for some ports (like Unix), and leads
to incomplete stack frame being captured, with following GC issues. So, now
each port should call mp_stack_ctrl_init() on its own, ASAP after startup,
and taking special precautions so it really was called before stack variables
get allocated (because if such variable with a pointer is missed, it may lead
to over-collecting (typical symptom is segfaulting)).
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c index b0f407a15..e4a4d5b3f 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -61,7 +61,6 @@ const mp_obj_module_t mp_module___main__ = { void mp_init(void) { qstr_init(); - mp_stack_ctrl_init(); // no pending exceptions to start with MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL; |