aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-06 07:14:28 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-06 07:14:28 +0000
commit633574eee5ed28367d868bbe6391b3e8f7bba08f (patch)
tree77c6cd00a90c7aa646e8ce65947c7c9bec2c59bf /cont.c
parent07264c40da8b19f86132a898f1a3ac74ceecf42c (diff)
downloadruby-633574eee5ed28367d868bbe6391b3e8f7bba08f.tar.gz
* vm_args.c: protect value stack from calling other methods
during complex parameter setting process (splat, kw, and so on). [Bug #11027] * vm_core.h: remove rb_thead_t::mark_stack_len. With this modification, we don't need to use th->mark_stack_len. * test/ruby/test_keyword.rb: add a test. * cont.c (cont_capture): catch up this fix. * vm.c (rb_thread_mark): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index 78ae0892b0..22e0c5abe0 100644
--- a/cont.c
+++ b/cont.c
@@ -490,7 +490,7 @@ cont_capture(volatile int *stat)
contval = cont->self;
#ifdef CAPTURE_JUST_VALID_VM_STACK
- cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack;
+ cont->vm_stack_slen = th->cfp->sp - th->stack;
cont->vm_stack_clen = th->stack + th->stack_size - (VALUE*)th->cfp;
cont->vm_stack = ALLOC_N(VALUE, cont->vm_stack_slen + cont->vm_stack_clen);
MEMCPY(cont->vm_stack, th->stack, VALUE, cont->vm_stack_slen);