diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | vm.c | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Dec 18 21:09:23 2007 Koichi Sasada <[email protected]> + + * vm.c (invoke_block): merge 2 stack overflow checks. + Tue Dec 18 20:58:35 2007 Koichi Sasada <[email protected]> * compile.c, insnhelper.ci, insns.def, object.c, vm.c, vm.h: @@ -550,8 +550,7 @@ invoke_block(rb_thread_t *th, rb_block_t *block, VALUE self, int argc, VALUE *ar rb_vm_set_finish_env(th); - CHECK_STACK_OVERFLOW(th->cfp, argc); - CHECK_STACK_OVERFLOW(th->cfp, iseq->stack_max); + CHECK_STACK_OVERFLOW(th->cfp, argc + iseq->stack_max); for (i=0; i<argc; i++) { th->cfp->sp[i] = argv[i]; |