Project

General

Profile

Bug #5083 » fix-to-check-cfp.patch

ktsj (Kazuki Tsujimoto), 07/23/2011 10:03 AM

View differences:

vm.c
{
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
if (cfp == 0) {
rb_raise(rb_eRuntimeError, "Can't call on top of Fiber or Thread");
}
return vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp);
}
......
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
if (cfp == 0) {
rb_raise(rb_eRuntimeError, "Can't call on top of Fiber or Thread");
}
return vm_get_cbase(cfp->iseq, cfp->lfp, cfp->dfp);
}
......
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
VALUE proc;
if (cfp == 0) {
rb_bug("m_core_set_postexe: unreachable");
}
GetISeqPtr(iseqval, blockiseq);
blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(cfp);
    (1-1/1)