diff options
Diffstat (limited to 'insnhelper.h')
-rw-r--r-- | insnhelper.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/insnhelper.h b/insnhelper.h index eb6b3ef21b..2eb071df5f 100644 --- a/insnhelper.h +++ b/insnhelper.h @@ -127,8 +127,11 @@ #define GET_BLOCK_PTR() \ ((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LFP()[0]))) -#define CHECK_STACK_OVERFLOW(th, cfp, margin) \ - (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp)) +#define CHECK_STACK_OVERFLOW(cfp, margin) do \ + if (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp)) { \ + rb_exc_raise(sysstack_error); \ + } \ +while (0) /**********************************************************/ /* deal with control flow 3: exception */ |