1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Take the VM lock when recompiling

This commit is contained in:
Alan Wu 2020-10-15 09:06:42 -04:00
parent 8bda11f690
commit 7650352868

View file

@ -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
}