From 2709a3ddd11de6554cabdfe59acd98d2ceedb135 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Tue, 17 Mar 2026 22:18:45 +1300 Subject: Ensure fiber stack is freed in all cases, if the fiber is terminated. (#16416) [Bug #21955] --- cont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cont.c b/cont.c index b33c1462bf..8956ff3c49 100644 --- a/cont.c +++ b/cont.c @@ -2755,7 +2755,7 @@ fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int kw_splat, rb_fi // We cannot free the stack until the pthread is joined: #ifndef COROUTINE_PTHREAD_CONTEXT - if (resuming_fiber && FIBER_TERMINATED_P(fiber)) { + if (FIBER_TERMINATED_P(fiber)) { RB_VM_LOCKING() { fiber_stack_release(fiber); } -- cgit v1.2.3