summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h
index e5680a2731..61164de9a9 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -187,7 +187,7 @@ char *strrchr _((const char *, const char));
}
#define CHECK_STACK_OVERFLOW(cfp, margin) do \
- if (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp)) { \
+ if (((VALUE *)(cfp)->sp) + (margin) + sizeof(rb_control_frame_t) >= ((VALUE *)cfp)) { \
rb_exc_raise(sysstack_error); \
} \
while (0)