diff options
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--; |