From 8ef312fc5bfa9c585a917dc006eeb7f2cad1b73f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 16 Jun 2022 00:47:16 -0700 Subject: [PATCH] MJIT: Consider compaction on CC failure --- mjit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mjit.c b/mjit.c index cd283d686f..d687075b03 100644 --- a/mjit.c +++ b/mjit.c @@ -327,7 +327,9 @@ mjit_notify_waitpid(int status) } if (!success) { verbose(2, "Failed to generate so"); - current_cc_unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC; // TODO: consider unit->compact_p + if (!current_cc_unit->compact_p) { + current_cc_unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC; + } free_unit(current_cc_unit); current_cc_unit = NULL; return;