зеркало из https://github.com/github/ruby.git
Avoid re-entering opt_invokebuiltin_delegate_leave
on interruption. The cancellation code was originally written for leave insn, but re-entering opt_invokebuiltin_delegate_leave insn on a cancellation is not safe, because a builtin function is executed twice.
This commit is contained in:
Родитель
5e00eeb4d4
Коммит
2a1c68c91e
|
@ -84,8 +84,7 @@ switch (insn) {
|
|||
fprintf(f, " if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {\n");
|
||||
fprintf(f, " reg_cfp->sp = vm_base_ptr(reg_cfp) + %d;\n", b->stack_size);
|
||||
fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos);
|
||||
fprintf(f, " RB_DEBUG_COUNTER_INC(mjit_cancel_leave);\n");
|
||||
fprintf(f, " goto cancel;\n");
|
||||
fprintf(f, " rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " ec->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(reg_cfp);\n"); // vm_pop_frame
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче