summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mjit_worker.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 4b70c0ba73..5090f8644c 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -1238,6 +1238,10 @@ mjit_worker(void)
}
}
+ /* Disable dispatching this job in mjit_copy_job_handler while memory allocated by alloca
+ could be expired after finishing this function. */
+ job.finish_p = TRUE;
+
/* To keep mutex unlocked when it is destroyed by mjit_finish, don't wrap CRITICAL_SECTION here. */
worker_stopped = TRUE;
}