summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 22:27:04 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 22:27:04 +0000
commit297ae3437e168e8cdeae24c44f56fc373a83d098 (patch)
tree9d9699e48467b86dfad200d511a8fbc2cc9432b9
parentefee3033b5ab03b4d4562c678e7a2feac8a110a9 (diff)
mjit.c: clean up unit link from iseq
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--mjit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mjit.c b/mjit.c
index 8cba274..4274ed4 100644
--- a/mjit.c
+++ b/mjit.c
@@ -562,8 +562,10 @@ clean_object_files(struct rb_mjit_unit *unit)
static void
free_unit(struct rb_mjit_unit *unit)
{
- if (unit->iseq) /* ISeq is not GCed */
+ if (unit->iseq) { /* ISeq is not GCed */
unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC;
+ unit->iseq->body->jit_unit = NULL;
+ }
if (unit->handle) /* handle is NULL if it's in queue */
dlclose(unit->handle);
clean_object_files(unit);