Skip to content

Keep the Fiber alive across rb_fiber_transfer() - #225

Closed
tavianator wants to merge 1 commit into
mainfrom
keep-fiber-alive
Closed

tavianator wants to merge 1 commit into
mainfrom
keep-fiber-alive

Conversation

@tavianator

Copy link
Copy Markdown
Contributor

Recently I was debugging a SIGSEGV that showed an rb_fiber_t that had
been entirely overwritten by JSON text. In tracing it down I found
Ruby bug #22196 which seems like a likely cause. Since that fix hasn't
made it into a released version of Ruby, add a workaround to fiber.c
which adds a GC guard for the fiber to keep it alive across the call.

Link: https://bugs.ruby-lang.org/issues/22196
Link: ruby/ruby#17957

Types of Changes

  • Bug fix.

Contribution

Recently I was debugging a SIGSEGV that showed an rb_fiber_t that had
been entirely overwritten by JSON text.  In tracing it down I found
Ruby bug #22196 which seems like a likely cause.  Since that fix hasn't
made it into a released version of Ruby, add a workaround to `fiber.c`
which adds a GC guard for the fiber to keep it alive across the call.

Link: https://bugs.ruby-lang.org/issues/22196
Link: ruby/ruby#17957
@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Fixed versions of Ruby should be released this month, possibly in the next few days. If that's the case, let's wait for that instead.

@ioquatix

Copy link
Copy Markdown
Member

New releases dropped today with the fixes. I propose we update those instead (proper fix).

@ioquatix ioquatix closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants