summaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-25 18:39:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-25 18:39:23 +0000
commitedf0e471c49dd54c8787b8b234c4accafceae27a (patch)
tree92e0c6425e61897710b7aacfe0be69fcaa896265 /cont.c
parent544061b4d4c9d919160b8fd88d771d7b308e70c3 (diff)
downloadruby-edf0e471c49dd54c8787b8b234c4accafceae27a.tar.gz
ruby-edf0e471c49dd54c8787b8b234c4accafceae27a.tar.xz
ruby-edf0e471c49dd54c8787b8b234c4accafceae27a.zip
* cont.c (rb_fiber_s_new), yarvcore.c (th_init2): fix to clear
VM stack ([ruby-dev:31046]). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 71bc4601b..022df065a 100644
--- a/cont.c
+++ b/cont.c
@@ -474,6 +474,8 @@ rb_fiber_s_new(VALUE self)
th->stack = 0;
th->stack_size = FIBER_STACK_SIZE;
th->stack = ALLOC_N(VALUE, th->stack_size);
+ MEMZERO(th->stack, VALUE, th->stack_size);
+
th->cfp = (void *)(th->stack + th->stack_size);
th->cfp--;
th->cfp->pc = 0;