diff options
author | Takashi Kokubun <[email protected]> | 2020-02-28 23:58:33 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-28 23:58:33 -0800 |
commit | adcf0316d1ecedae2a9157ad941550e0c0fb510b (patch) | |
tree | b9fc854a840690799088e00677c62fc0beb96a96 /mjit.c | |
parent | a8dcab723316997d9e01c89d6df969edce75bdca (diff) |
Prevent unloading methods used in root_fiber while calling another Fiber (#2939)
Fixing SEGVs like:
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744905
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744420
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2741400
Notes
Notes:
Merged-By: k0kubun <[email protected]>
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include "id_table.h" #include "internal.h" #include "internal/class.h" +#include "internal/cont.h" #include "internal/file.h" #include "internal/hash.h" #include "internal/mjit.h" @@ -811,6 +812,9 @@ mjit_init(const struct mjit_options *opts) rb_native_cond_initialize(&mjit_worker_wakeup); rb_native_cond_initialize(&mjit_gc_wakeup); + // Make sure root_fiber's saved_ec is scanned by mark_ec_units + rb_fiber_init_mjit_cont(GET_EC()->fiber_ptr); + // Initialize class_serials cache for compilation valid_class_serials = rb_hash_new(); rb_obj_hide(valid_class_serials); |