[前][次][番号順一覧][スレッド一覧]

ruby-changes:48385

From: ko1 <ko1@a...>
Date: Sat, 28 Oct 2017 14:36:53 +0900 (JST)
Subject: [ruby-changes:48385] ko1:r60499 (trunk): skip machine stack marking for current ec.

ko1	2017-10-28 14:36:48 +0900 (Sat, 28 Oct 2017)

  New Revision: 60499

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

  Log:
    skip machine stack marking for current ec.
    
    * vm.c (rb_execution_context_mark): At the beggining of GC marking,
      mark_current_machine_context() marks running machine stack so that
      rb_execution_context_mark() should not mark machine stack if it is
      current ec.

  Modified files:
    trunk/vm.c
Index: vm.c
===================================================================
--- vm.c	(revision 60498)
+++ vm.c	(revision 60499)
@@ -2398,7 +2398,9 @@ rb_execution_context_mark(const rb_execu https://github.com/ruby/ruby/blob/trunk/vm.c#L2398
     }
 
     /* mark machine stack */
-    if (ec->machine.stack_start && ec->machine.stack_end) {
+    if (ec->machine.stack_start && ec->machine.stack_end &&
+	ec != GET_EC() /* marked for current ec at the first stage of marking */
+	) {
 	rb_gc_mark_machine_stack(ec);
 	rb_gc_mark_locations((VALUE *)&ec->machine.regs,
 			     (VALUE *)(&ec->machine.regs) +

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]