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

ruby-changes:53673

From: samuel <ko1@a...>
Date: Wed, 21 Nov 2018 03:37:40 +0900 (JST)
Subject: [ruby-changes:53673] samuel:r65874 (trunk): Fix exposure of stack allocations.

samuel	2018-11-20 19:18:08 +0900 (Tue, 20 Nov 2018)

  New Revision: 65874

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

  Log:
    Fix exposure of stack allocations.

  Modified files:
    trunk/cont.c
Index: cont.c
===================================================================
--- cont.c	(revision 65873)
+++ cont.c	(revision 65874)
@@ -179,7 +179,7 @@ fiber_context_create(ucontext_t *context https://github.com/ruby/ruby/blob/trunk/cont.c#L179
 }
 #endif
 
-#if FIBER_USE_NATIVE
+#if FIBER_USE_NATIVE && !defined(_WIN32)
 #define MAX_MACHINE_STACK_CACHE  10
 static int machine_stack_cache_index = 0;
 typedef struct machine_stack_cache_struct {
@@ -1861,7 +1861,7 @@ rb_fiber_terminate(rb_fiber_t *fib, int https://github.com/ruby/ruby/blob/trunk/cont.c#L1861
 #elif !defined(_WIN32)
     fib->context.uc_stack.ss_sp = NULL;
 #endif
-#endif
+
 #ifdef MAX_MACHINE_STACK_CACHE
     /* Ruby must not switch to other thread until storing terminated_machine_stack */
     terminated_machine_stack.ptr = fib->ss_sp;
@@ -1870,6 +1870,7 @@ rb_fiber_terminate(rb_fiber_t *fib, int https://github.com/ruby/ruby/blob/trunk/cont.c#L1870
     fib->cont.machine.stack = NULL;
     fib->cont.machine.stack_size = 0;
 #endif
+#endif
 
     ret_fib = return_fiber();
     if (need_interrupt) RUBY_VM_SET_INTERRUPT(&ret_fib->cont.saved_ec);

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

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