aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 6d4887024b..0660c7dd03 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -29,7 +29,9 @@ vm_push_frame(rb_thread_t * th, const rb_iseq_t * iseq,
rb_control_frame_t * const cfp = th->cfp - 1;
int i;
- CHECK_STACK_OVERFLOW(th->cfp, local_size);
+ if ((void *)(sp + local_size) >= (void *)cfp) {
+ rb_exc_raise(sysstack_error);
+ }
th->cfp = cfp;
/* setup vm value stack */