aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 17:30:16 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 17:30:16 +0000
commitfc508ff38b968bf870104b813db9d1b6496af22f (patch)
tree11d25ced42f84dc0ef61fcfcda87b558a98f4566 /cont.c
parent2c300b14260052c0a56fa368d22576053440f33a (diff)
downloadruby-fc508ff38b968bf870104b813db9d1b6496af22f.tar.gz
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cont.c b/cont.c
index 8fa1f1e46a..dd15c30a4c 100644
--- a/cont.c
+++ b/cont.c
@@ -485,16 +485,14 @@ cont_save_thread(rb_context_t *cont, rb_thread_t *th)
/* 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