ruby-changes:47713
From: ko1 <ko1@a...>
Date: Mon, 11 Sep 2017 02:30:23 +0900 (JST)
Subject: [ruby-changes:47713] ko1:r59829 (trunk): clear `stack_end`.
ko1 2017-09-11 02:30:16 +0900 (Mon, 11 Sep 2017) New Revision: 59829 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59829 Log: clear `stack_end`. * cont.c (cont_save_thread): clear only `stack_end`. Clearing tells GC mark function to ignore this macine stack (not allocated yet). `stack_start` will be used by machine stack store/restore phase (on FIBER_USE_NATIVE == 0), so that only `stack_end` is cleared. Modified files: trunk/cont.c Index: cont.c =================================================================== --- cont.c (revision 59828) +++ cont.c (revision 59829) @@ -485,16 +485,14 @@ cont_save_thread(rb_context_t *cont, rb_ https://github.com/ruby/ruby/blob/trunk/cont.c#L485 /* save thread context */ sth->ec = th->ec; -#if FIBER_USE_NATIVE - /* saved_thread->machine.stack_(start|end) should be NULL */ + /* saved_thread->machine.stack_end should be NULL */ /* because it may happen GC afterward */ - sth->ec.machine.stack_start = NULL; sth->ec.machine.stack_end = NULL; + #ifdef __ia64 sth->ec.machine.register_stack_start = NULL; sth->ec.machine.register_stack_end = NULL; #endif -#endif } static void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/