diff options
author | samuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-20 10:18:08 +0000 |
---|---|---|
committer | samuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-20 10:18:08 +0000 |
commit | c5d3b83a9f8b6a02dff3fd6f81af03c1591cc2f6 (patch) | |
tree | c4e1f9ef7bf82bd6df2420d099220b44d2f845ad | |
parent | 8b1b056e1c630e60ad55cee430c8aa92046b3537 (diff) | |
download | ruby-c5d3b83a9f8b6a02dff3fd6f81af03c1591cc2f6.tar.gz |
Fix exposure of stack allocations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | cont.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -179,7 +179,7 @@ fiber_context_create(ucontext_t *context, void (*func)(), void *arg, void *ptr, } #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 need_interrupt) #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 need_interrupt) 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); |