Project

General

Profile

Actions

Bug #19411

closed

GC issue with moved objects

Added by luke-gru (Luke Gruber) about 1 year ago. Updated 3 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:112211]

Description

This crashes:

class Obj
  def initialize
    @obj = 3
  end
end

GC.stress = true
r = Ractor.new do
  obj = receive
  p obj
end
obj = Obj.new
r.send(obj, move: true)
r.take

It only crashes with nested objects, if you remove the ivar set in initialize it works fine. Maybe missing RB_GC_GUARD?

Updated by luke-gru (Luke Gruber) about 1 year ago

The issue is again with shapes (related to https://bugs.ruby-lang.org/issues/19409). Newly moved objects (class MovedObject) need to have their shape reset to root shape. I'll make a PR for this.

Actions #3

Updated by jeremyevans0 (Jeremy Evans) 3 months ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0