diff options
Diffstat (limited to 'mjit_worker.c')
-rw-r--r-- | mjit_worker.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c index 5fbad3fe5a..4dcf076177 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -947,7 +947,8 @@ compile_compact_jit_code(char* c_file) // compacted functions (not done yet). bool success = true; CRITICAL_SECTION_START(3, "before active_units list_for_each"); - list_for_each(&active_units.head, child_unit, unode) { + list_for_each_safe(&active_units.head, child_unit, next, unode) { + CRITICAL_SECTION_FINISH(3, "after active_units list_for_each"); char funcname[MAXPATHLEN]; sprint_funcname(funcname, child_unit); @@ -961,6 +962,8 @@ compile_compact_jit_code(char* c_file) if (!iseq_label) iseq_label = sep = ""; fprintf(f, "\n/* %s%s%s:%ld */\n", iseq_label, sep, iseq_path, iseq_lineno); success &= mjit_compile(f, child_unit->iseq, funcname, child_unit->id); + + CRITICAL_SECTION_START(3, "before active_units list_for_each"); } CRITICAL_SECTION_FINISH(3, "after active_units list_for_each"); |