==22862== Conditional jump or move depends on uninitialised value(s)
==22862== at 0x5446D7F: gc_mark_subtree (in myTest.so)
==22862== by 0x5446F3B: gc_collect_root (in myTest.so)
==22862== by 0x54315B1: gc_collect_regs_and_stack (gccollect.c:167)
==22862== by 0x5431684: gc_collect (gccollect.c:175)
==22862== by 0x54472A5: gc_alloc (in myTest.so)
==22862== by 0x545ABEE: m_malloc (in myTest.so)
==22862== by 0x54538CD: mp_obj_new_list (in myTest.so)
==22862== by 0x5459B77: mp_execute_bytecode (in myTest.so)
==22862== by 0x5451F44: fun_bc_call (in myTest.so)
==22862== by 0x5412C27: mp_script_exec (MyTestFile:354)
Running on Ubuntu x86-64 platform. Here is the related gc_collect code
Code: Select all
MP_NOINLINE void gc_collect_regs_and_stack(void) {
regs_t regs;
gc_helper_get_regs(regs);
void **regs_ptr = (void**)(void*)®s;
gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_THREAD(stack_top) - (uintptr_t)®s) / sizeof(uintptr_t));
}
void gc_collect(void) {
gc_collect_start();
gc_collect_regs_and_stack();
gc_collect_end();
}