diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-15 16:50:45 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-15 16:50:47 -0700 |
commit | 15a6dd56e08dddea9201c072567986368e1c508e (patch) | |
tree | 394d7f3f32081363527e4dff1af89fa571c534a3 /mjit.c | |
parent | 17d260a87fd0cb4433d29c21f3a69ea963c64056 (diff) |
MJIT: Handle C compiler failures
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -248,7 +248,7 @@ check_unit_queue(void) // JIT failure if (current_cc_pid == -1) { current_cc_pid = 0; - current_cc_unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC; + current_cc_unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC; // TODO: consider unit->compact_p current_cc_unit = NULL; return; } @@ -327,8 +327,9 @@ mjit_notify_waitpid(int status) } if (!success) { verbose(2, "Failed to generate so"); - // TODO: free unit? - // TODO: set NOT_COMPILED_JIT_ISEQ_FUNC? + current_cc_unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC; // TODO: consider unit->compact_p + free_unit(current_cc_unit); + current_cc_unit = NULL; return; } @@ -906,7 +907,7 @@ stop_worker(void) { stop_worker_p = true; if (current_cc_unit != NULL) { - mjit_wait(current_cc_unit->iseq->body); + mjit_wait(current_cc_unit->iseq->body); // TODO: consider unit->compact_p } worker_stopped = true; } |