From: Eric Wong Date: 2018-08-30T19:58:30+00:00 Subject: [ruby-core:88763] Re: [Ruby trunk Bug#15050] GC after forking with fibers crashes normalperson@yhbt.net wrote: > https://bugs.ruby-lang.org/issues/15050 This fixes the immediate bug, but I think there's other problems with stack management ``` diff --git a/cont.c b/cont.c index 7bc1724176..ab42dfb27a 100644 --- a/cont.c +++ b/cont.c @@ -1983,6 +1983,7 @@ rb_fiber_atfork(rb_thread_t *th) { if (th->root_fiber) { if (&th->root_fiber->cont.saved_ec != th->ec) { + th->root_fiber->cont.type = FIBER_CONTEXT; th->root_fiber = th->ec->fiber_ptr; th->root_fiber->cont.type = ROOT_FIBER_CONTEXT; } ``` Unsubscribe: