ruby-changes:55430
From: k0kubun <ko1@a...>
Date: Sat, 20 Apr 2019 14:50:23 +0900 (JST)
Subject: [ruby-changes:55430] k0kubun:r67639 (trunk): Revert "Revert "Skip ISeq reference for stale_units for debugging""
k0kubun 2019-04-20 14:50:19 +0900 (Sat, 20 Apr 2019) New Revision: 67639 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67639 Log: Revert "Revert "Skip ISeq reference for stale_units for debugging"" This reverts commit b79899b56a9ebadf5c493c4df2419ebf63934381. I wanted to test r67638 first. Now let me try this as well. Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 67638) +++ mjit.c (revision 67639) @@ -177,7 +177,21 @@ free_list(struct rb_mjit_unit_list *list https://github.com/ruby/ruby/blob/trunk/mjit.c#L177 list_for_each_safe(&list->head, unit, next, unode) { list_del(&unit->unode); if (!close_handle_p) unit->handle = NULL; /* Skip dlclose in free_unit() */ - free_unit(unit); + + if (list == &stale_units) { // `free_unit(unit)` crashes after GC.compact on `stale_units` + /* + * TODO: REVERT THIS BRANCH + * Debug the crash on stale_units w/ GC.compact and just use `free_unit(unit)`!! + */ + if (unit->handle && dlclose(unit->handle)) { + mjit_warning("failed to close handle for u%d: %s", unit->id, dlerror()); + } + clean_object_files(unit); + free(unit); + } + else { + free_unit(unit); + } } list->length = 0; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/