Project

General

Profile

Actions

Bug #14195

closed

[PATCH] IO#pwrite uses tmp buffer to avoid parallel modification

Added by normalperson (Eric Wong) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:84316]

Description

Since we release GVL, we must freeze a 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}

Trivial bugfix, will commit before 2.5 final.

I think some ext/socket methods (sendmsg, setsockopt) may need this, too;
and fcntl/ioctl/getsockopt will need locktmp for strings...


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0