summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2026-03-17 22:18:45 +1300
committerTakashi Kokubun <takashikkbn@gmail.com>2026-03-17 09:00:11 -0700
commit2709a3ddd11de6554cabdfe59acd98d2ceedb135 (patch)
treeee7ab31e25202261cea6f728fc71864ab67ab045
parentb01ca60e88d93ff7e93e11951ff8a1ba57462463 (diff)
Ensure fiber stack is freed in all cases, if the fiber is terminated. (#16416)
[Bug #21955]
-rw-r--r--cont.c2
1 files changed, 1 insertions, 1 deletions
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);
}