summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorsamuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-01 03:49:52 +0000
committersamuel <samuel@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-01 03:49:52 +0000
commit4b99725de99f7dd6d6e6ef79bdc1b46372faafca (patch)
tree14f1f6765b95886e045ecf7c11ab4bfd1fdffc0d /cont.c
parent57005046a13c62896e8d420e99d14535aec6aa67 (diff)
Avoid GCing dead stack after switching away from a fiber
Fixes <https://bugs.ruby-lang.org/issues/14561> and discussed <https://bugs.ruby-lang.org/issues/15362>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 142713ad84..da469b6cd5 100644
--- a/cont.c
+++ b/cont.c
@@ -1747,6 +1747,7 @@ fiber_store(rb_fiber_t *next_fib, rb_thread_t *th)
return fib->cont.value;
#else /* FIBER_USE_NATIVE */
+ fib->cont.saved_ec.machine.stack_end = NULL;
if (ruby_setjmp(fib->cont.jmpbuf)) {
/* restored */
fib = th->ec->fiber_ptr;