ruby-changes:35886
From: normal <ko1@a...>
Date: Thu, 16 Oct 2014 08:40:43 +0900 (JST)
Subject: [ruby-changes:35886] normal:r47967 (trunk): cont.c: fix when FIBER_USE_NATIVE is 0
normal 2014-10-16 08:40:33 +0900 (Thu, 16 Oct 2014) New Revision: 47967 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47967 Log: cont.c: fix when FIBER_USE_NATIVE is 0 * cont.c (fiber_store): restore references to next_fib (fix typo) Modified files: trunk/ChangeLog trunk/cont.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47966) +++ ChangeLog (revision 47967) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 16 08:40:04 2014 Eric Wong <e@8...> + + * cont.c (fiber_store): restore references to next_fib (fix typo) + Thu Oct 16 08:26:08 2014 Eric Wong <e@8...> * cont.c (fiber_store): remove references to nextfib Index: cont.c =================================================================== --- cont.c (revision 47966) +++ cont.c (revision 47967) @@ -1377,11 +1377,15 @@ fiber_store(rb_fiber_t *next_fib, rb_thr https://github.com/ruby/ruby/blob/trunk/cont.c#L1377 /* restored */ fib = th->fiber; if (fib->cont.argc == -1) rb_exc_raise(fib->cont.value); + if (next_fib->cont.value == Qundef) { + cont_restore_0(&next_fib->cont, &next_fib->cont.value); + rb_bug("rb_fiber_resume: unreachable"); + } return fib->cont.value; } else { VALUE undef = Qundef; - cont_restore_0(&fib->cont, &undef); + cont_restore_0(&next_fib->cont, &undef); rb_bug("rb_fiber_resume: unreachable"); } #endif /* FIBER_USE_NATIVE */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/