Project

General

Profile

Bug #13412 » ensure_stack.patch

wanabe (_ wanabe), 04/16/2017 11:55 PM

View differences:

vm.c
return vm_exec(th);
}
static void
ensure_stack(int n, ...)
{
if (n <= 0) return;
ensure_stack(n - 1, 0, 1, 2, 3, 4, 5, 6, 7);
}
static VALUE
invoke_bmethod(rb_thread_t *th, const rb_iseq_t *iseq, VALUE self, const struct rb_captured_block *captured, const rb_callable_method_entry_t *me, VALUE type, int opt_pc)
{
......
int arg_size = iseq->body->param.size;
VALUE ret;
ensure_stack(32);
vm_push_frame(th, iseq, type | VM_FRAME_FLAG_FINISH | VM_FRAME_FLAG_BMETHOD, self,
VM_GUARDED_PREV_EP(captured->ep),
(VALUE)me,
(11-11/13)