[ruby-cvs:66594] normal:r59416 (trunk): dir.c (ruby_brace_expand): RB_GC_GUARD safety

normal at ruby-lang.org normal at ruby-lang.org
Tue Jul 25 14:55:22 JST 2017


normal	2017-07-25 14:55:22 +0900 (Tue, 25 Jul 2017)

  New Revision: 59416

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

  Log:
    dir.c (ruby_brace_expand): RB_GC_GUARD safety
    
    The lifetime of a String VALUE must match or exceed the lifetime
    of its R*_PTR result; otherwise the GC can while reclaim the
    VALUE while the R*_PTR result is in use.
    
    * dir.c (ruby_brace_expand): add var parameter for GC guard
      (ruby_brace_glob_with_enc): adjust call
      (file_s_fnmatch): ditto
      (push_glob): remove misplaced GC guard

  Modified files:
    trunk/dir.c


More information about the ruby-cvs mailing list