From: Eric Wong Date: 2018-10-30T03:08:40+00:00 Subject: [ruby-core:89629] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process > I am going to move more data into rb_mjit_unit struct for state > management using callbacks and events. It looks like > rb_mjit_unit_node is useless so I will get rid of it and > embed ccan/list node into rb_mjit_unit. > > compact_units list is useless and you have no plans for it right? I'm testing this patch for ccan/list in rb_mjit_unit: https://80x24.org/spew/20181030030441.10036-1-e@80x24.org/raw Howeever, I think I found an old bug. Accessing unit->iseq->body outside of critical section seems wrong and I hit a segfault: ``` CRITICAL_SECTION_FINISH(3, "before mjit_compile to wait GC finish"); { VALUE s = rb_iseq_path(unit->iseq); const char *label = RSTRING_PTR(unit->iseq->body->location.label); const char *path = RSTRING_PTR(s); int lineno = FIX2INT(unit->iseq->body->location.first_lineno); verbose(2, "start compilation: %s@%s:%d -> %s", label, path, lineno, c_file); fprintf(f, "/* %s@%s:%d */\n\n", label, path, lineno); } success = mjit_compile(f, unit->iseq->body, funcname, cc_entries, is_entries); /* release blocking mjit_gc_start_hook */ CRITICAL_SECTION_START(3, "after mjit_compile to wakeup client for GC"); ``` Unsubscribe: