path: root/mjit_worker.c
diff options
authorTakashi Kokubun <>2020-11-21 19:24:59 -0800
committerTakashi Kokubun <>2020-11-21 19:36:55 -0800
commite0156bd39656e26971e4236747e9cd4f45f8b35f (patch)
treeeea453a551e34906c5208299d516795cf94318ba /mjit_worker.c
parenteb3906c6b8ea3d88c5c53cb420e18dcda4d7081e (diff)
Make sure all threads are scanned on unload_units
This has been a TODO since 79df14c04b. While adcf0316d1 covered the root_fiber of the initial thread, it didn't cover root_fibers of other threads. Now it's hooked properly in rb_threadptr_root_fiber_setup. With regards to "XXX: Is this mjit_cont `mjit_cont_free`d?", when rb_threadptr_root_fiber_release is called, although I'm not sure when th->root_fiber is truthy, fiber_free seems to call cont_free and mjit_cont_free. So mjit_conts of root_fibers seem to be freed properly.
Diffstat (limited to 'mjit_worker.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index d410117..c024085 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -166,7 +166,7 @@ struct rb_mjit_unit {
char *so_file;
// Only used by unload_units. Flag to check this unit is currently on stack or not.
- char used_code_p;
+ bool used_code_p;
struct list_node unode;
// mjit_compile's optimization switches
struct rb_mjit_compile_info compile_info;