diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 18:39:23 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 18:39:23 +0000 |
commit | 702e431f1b3741ac3e88d05e450f32b745207f5c (patch) | |
tree | 92e0c6425e61897710b7aacfe0be69fcaa896265 /yarvcore.c | |
parent | 0043929b5f564ef6c9377d8321a4e4a4b7ec6e14 (diff) |
* cont.c (rb_fiber_s_new), yarvcore.c (th_init2): fix to clear
VM stack ([ruby-dev:31046]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvcore.c')
-rw-r--r-- | yarvcore.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yarvcore.c b/yarvcore.c index e4e93aa0e4..f5b3225a2f 100644 --- a/yarvcore.c +++ b/yarvcore.c @@ -327,9 +327,10 @@ th_init2(rb_thread_t *th) MEMZERO(th, rb_thread_t, 1); /* allocate thread stack */ - th->stack = ALLOC_N(VALUE, RUBY_VM_THREAD_STACK_SIZE); - th->stack_size = RUBY_VM_THREAD_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--; |