diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-26 10:28:26 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-26 10:28:26 +0000 |
commit | 621da983093b0877d061c0fa081c0301ea8ffd3f (patch) | |
tree | c787bbe841722c3e7968ac515c7ee524b1f447d9 /vm_exec.h | |
parent | d462261395534207d71d07f4a47a6860cf9349bb (diff) | |
download | ruby-621da983093b0877d061c0fa081c0301ea8ffd3f.tar.gz |
* vm_exec.h, tool/instruction.rb: not an error, but a BUG if stack
overflow checking failed just before/after the beginning of an
instruction. It should be treated as a BUG.
Please tell us if your code cause BUG with this problem.
This check will removed soon (for performance).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.h')
-rw-r--r-- | vm_exec.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -169,5 +169,9 @@ default: \ #endif #define SCREG(r) (reg_##r) +#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) \ + if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)(cfp))) { \ + 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."); \ + } while (0); #endif /* RUBY_VM_EXEC_H */ |