[ruby-cvs:67632] ko1:r60451 (trunk): fix freeing `th->ec` bugs.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Oct 26 23:21:31 JST 2017


ko1	2017-10-26 23:21:31 +0900 (Thu, 26 Oct 2017)

  New Revision: 60451

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60451

  Log:
    fix freeing `th->ec` bugs.
    
    * vm.c (thread_free): simply call rb_threadptr_root_fiber_release().
    
    * cont.c (rb_threadptr_root_fiber_release): release th->ec (ec->fiber)
      iff root_fiber is NULL. If root_fiber is available, then ignore it
      and root fiber object will free th->ec too.
    
    * cont.c (rb_threadptr_root_fiber_setup): do not set th->root_fiber.
      th->root_fiber will be set if a root fiber object is created.

  Modified files:
    trunk/cont.c
    trunk/vm.c


More information about the ruby-cvs mailing list