Project

General

Profile

« Previous | Next » 

Revision 92f7813a

Added by ko1 (Koichi Sasada) over 6 years ago

release VM stack properly.

  • cont.c: r55766 change the handling method of Fiber's VM stack.
    Resumed Fiber points NULL as VM stack and running Thread has
    responsibility to manage it (marking and releasing).

    However, thread_start_func_2()@thread.c and thread_free()@vm.c
    doesn't free the VM stack if corresponding root Fiber is exist.
    This causes memory leak. [Bug #13772]

  • cont.c (root_fiber_alloc): fib->cont.saved_thread.ec.stack should be NULL
    because running thread has responsibility to manage this stack.

  • vm.c (rb_thread_recycle_stack_release): assert given stack is not NULL
    (callers should care it).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e