diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2020-10-15 09:06:42 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:25 -0400 |
| commit | 7650352868a4f56c9225dff58d1ba9aeedadee76 (patch) | |
| tree | 865621d87724ed3875cb4fbea82a660871a24e34 | |
| parent | 8bda11f69065d08284b5990097c45a05076d36bd (diff) | |
Take the VM lock when recompiling
| -rw-r--r-- | ujit_compile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ujit_compile.c b/ujit_compile.c index 1f42f52d1e..c731a29654 100644 --- a/ujit_compile.c +++ b/ujit_compile.c @@ -2,6 +2,7 @@ #include "insns.inc" #include "internal.h" #include "vm_core.h" +#include "vm_sync.h" #include "vm_callinfo.h" #include "builtin.h" #include "internal/compile.h" @@ -641,6 +642,7 @@ void rb_ujit_compile_iseq(const rb_iseq_t *iseq) { #if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE + RB_VM_LOCK(); VALUE *encoded = (VALUE *)iseq->body->iseq_encoded; unsigned int insn_idx; @@ -662,6 +664,7 @@ rb_ujit_compile_iseq(const rb_iseq_t *iseq) } insn_idx += len; } + RB_VM_UNLOCK(); #endif } |
