[ruby-cvs:66717] usa:r59539 (ruby_2_3): [Backport #13150]

usa at ruby-lang.org usa at ruby-lang.org
Wed Aug 9 17:40:46 JST 2017


usa	2017-08-09 17:40:46 +0900 (Wed, 09 Aug 2017)

  New Revision: 59539

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

  Log:
    [Backport #13150]
    
    this patch contains r54158, r57410, r57631 and r57954.
    
    Prevent GC by volatile [Bug #13150]
    
    test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
    are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
    20170115 (experimental); RB_GC_GUARD looks not worked well.
    
    * include/ruby/ruby.h (RB_GC_GUARD): prevent guarded pointer from
      optimization by using as an input to inline asm.
    
    * ruby.h: remove comment
    
    * include/ruby/ruby.h (RB_GC_GUARD): remove comment unsupported by
      Solaris AS.
    
    Hidden objects (klass == 0) are not visible to Ruby code invoked
    from other threads or signal handlers, so they can never be
    accessed from other contexts.  This makes it safe to call
    rb_gc_force_recycle on the object slot after releasing malloc
    memory.
    
    * marshal.c (rb_marshal_dump_limited): hide dump_arg and recycle when
      done (rb_marshal_load_with_proc): hide load_arg and recycle when done
      [ruby-core:79518]
    
    * marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
      may be dereferenced in check_dump_arg due to continuation, and
      get rid of dangling pointers.
    
    * marshal.c (rb_marshal_load_with_proc): ditto for load_arg.

  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/include/ruby/ruby.h
    branches/ruby_2_3/marshal.c
    branches/ruby_2_3/test/ruby/test_marshal.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list