From 52e35469f0a057ce31c04a36116e7a5563c2665b Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 18 Nov 2013 02:29:58 +0000 Subject: vm_core.h: extract VM_STACK_OVERFLOWED_P * vm_core.h (VM_STACK_OVERFLOWED_P, WHEN_VM_STACK_OVERFLOWED): extract condition from CHECK_VM_STACK_OVERFLOW. * vm_exec.c (vm_stack_overflow_for_insn): move rb_bug call. * vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): share the condition with CHECK_VM_STACK_OVERFLOW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_exec.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vm_exec.c') diff --git a/vm_exec.c b/vm_exec.c index c914a8bcca..c7057cd445 100644 --- a/vm_exec.c +++ b/vm_exec.c @@ -29,6 +29,15 @@ static void vm_analysis_insn(int insn); #endif /* #define DECL_SC_REG(r, reg) VALUE reg_##r */ +NORETURN(static void vm_stack_overflow_for_insn(void)); +static void +vm_stack_overflow_for_insn(void) +{ + rb_bug("CHECK_VM_STACK_OVERFLOW_FOR_INSN: should not overflow here. " + "Please contact ruby-core/dev with your (a part of) script. " + "This check will be removed soon."); +} + #if !OPT_CALL_THREADED_CODE static VALUE vm_exec_core(rb_thread_t *th, VALUE initial) -- cgit v1.2.1