[ruby-cvs:56834] ko1:r49684 (trunk): * gc.c (rb_objspace_call_finalizer): control GC execution during

ko1 at ruby-lang.org ko1 at ruby-lang.org
Sun Feb 22 11:00:41 JST 2015


ko1	2015-02-22 11:00:40 +0900 (Sun, 22 Feb 2015)

  New Revision: 49684

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49684

  Log:
    * gc.c (rb_objspace_call_finalizer): control GC execution during
      force firnalizations at the end of interpreter process.
      [Bug #10768]
      1) Prohibit incremental GC while running Ruby-level finalizers
         to avoid any danger.
      2) Prohibit GC while invoking T_DATA/T_FILE data structure
         because these operations break object relations consistency.
      This patch can introduce another memory consuming issue because
      Ruby-level finalizers can run after (2), GC is disabled.
      However, basically object consistency was broken at (2) as I
      described above. So that running Ruby-level finalizers contains
      danger originally. Because of this point, I need to suggest to
      remove these 3 lines (invoking remaining finalizers). And add a
      rule to add that finalizers should not add new finalizers, or
      say there is no guarantee to invoke finalizers that added by
      another finalizer.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c


More information about the ruby-cvs mailing list