[ruby-cvs:68557] normal:r61376 (trunk): io.c: IO#pwrite uses tmp buffer to avoid parallel modification

normal at ruby-lang.org normal at ruby-lang.org
Thu Dec 21 09:26:24 JST 2017


normal	2017-12-21 09:26:24 +0900 (Thu, 21 Dec 2017)

  New Revision: 61376

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

  Log:
    io.c: IO#pwrite uses tmp buffer to avoid parallel modification
    
    Since we release GVL, we must freeze and duplicate the string buffer
    to prevent other threads from modifying our buffer while we are
    waiting on pwrite(2).
    
    * io.c (rb_io_pwrite): use_rb_str_tmp_frozen_{acquire/release}
      [Bug #14195]

  Modified files:
    trunk/io.c


More information about the ruby-cvs mailing list