summaryrefslogtreecommitdiffstats
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 5b965d215..7974a75cd 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -26,9 +26,11 @@ vm_push_frame(rb_thread_t * th, const rb_iseq_t * iseq,
const VALUE *pc, VALUE *sp, VALUE *lfp,
int local_size)
{
- rb_control_frame_t * const cfp = th->cfp = th->cfp - 1;
+ rb_control_frame_t * const cfp = th->cfp - 1;
int i;
+ CHECK_STACK_OVERFLOW(th->cfp, local_size);
+ th->cfp = cfp;
/* setup vm value stack */
/* nil initialize */