[ruby-core:88763] Re: [Ruby trunk Bug#15050] GC after forking with fibers crashes

From: Eric Wong <normalperson@...>
Date: 2018-08-30 19:58:30 UTC
List: ruby-core #88763
[email protected] 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: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next