aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-16 07:18:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-16 07:18:45 +0000
commitc6bf95a867f31e7f676d2cdfc8826c3c00f77f0e (patch)
tree00e2405de5149748c73fdf788f5dd96b2bd2ea65 /vm_insnhelper.c
parente55558708cf8c9da520288475d67219c09aa59e0 (diff)
downloadruby-c6bf95a867f31e7f676d2cdfc8826c3c00f77f0e.tar.gz
vm_insnhelper.c: cfp error at stack overflow
* vm_insnhelper.c (threadptr_stack_overflow): set stack overflow flag until handling execptions, to get rid of cfp consistency error when exec tag was rewound. [ruby-core:80618] [Bug #13412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 69faf67fa6..303f9cc2fb 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -35,7 +35,7 @@ static void
threadptr_stack_overflow(rb_thread_t *th, int setup)
{
VALUE mesg = th->vm->special_exceptions[ruby_error_sysstack];
- th->ec.raised_flag = 0;
+ th->ec.raised_flag = RAISED_STACKOVERFLOW;
if (setup) {
VALUE at = rb_threadptr_backtrace_object(th);
mesg = ruby_vm_special_exception_copy(mesg);
@@ -1833,6 +1833,8 @@ vm_profile_show_result(void)
#define CHECK_CFP_CONSISTENCY(func) \
(LIKELY(reg_cfp == th->ec.cfp + 1) ? (void) 0 : \
+ rb_thread_raised_p(th, RAISED_STACKOVERFLOW) ? \
+ rb_thread_raised_reset(th, RAISED_STACKOVERFLOW) : \
rb_bug(func ": cfp consistency error (%p, %p)", reg_cfp, th->ec.cfp+1))
static inline