[Closed] SEGV when calling GC.start in a finalizer

Issue #9463 has been updated by Usaku NAKAMURA.

Status changed from Assigned to Closed
% Done changed from 0 to 100

Applied in changeset r44762.


merge revision(s) 33361,33460: [Backport #9463]

  • gc.c (slot_sweep, rb_gc_finalize_deferred)
    (rb_objspace_call_finalizer, rb_gc): run finalizers
    sequencially. [ruby-dev:44562]

  • gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
    should use ATOMIC_EXCHANGE() to check the previous value.
    [ruby-dev:44596] [Bug #5439]


Backport #9463: SEGV when calling GC.start in a finalizer
https://bugs.ruby-lang.org/issues/9463#change-44827

  • Author: Usaku NAKAMURA
  • Status: Closed
  • Priority: Normal
  • Assignee: Usaku NAKAMURA
  • Category:
  • Target version:
  • ruby -v: ruby 1.9.3p505 (2014-01-30 revision 44755)

minimum reproduce code:

raise_proc = proc do |id|
  GC.start
end
3.times do
  ObjectSpace.define_finalizer(Object.new, raise_proc)
end

to fix this, need to backport r33361 and r33460.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs