mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[python] Forbid inlining on gc_collect to avoid missing some roots
This commit is contained in:
committed by
LeaNumworks
parent
055f8bf1bd
commit
3f5487ca90
@@ -248,7 +248,10 @@ KDColor MicroPython::ColorParser::ParseColor(mp_obj_t input, ColorMode ColorMode
|
||||
mp_raise_TypeError("Color couldn't be parsed");
|
||||
}
|
||||
|
||||
void gc_collect(void) {
|
||||
/* Forbid inlining to ensure regs to be at the top of the stack. Otherwise,
|
||||
* LTO inlining can make regs lower on the stack than some just-allocated
|
||||
* pointers. */
|
||||
__attribute__((noinline)) void gc_collect(void) {
|
||||
void * python_stack_top = MP_STATE_THREAD(stack_top);
|
||||
assert(python_stack_top != NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user