Project

General

Profile

Backport #8980

backport r43112, r43114, r43117, r43118 (IO.pipe/popen and close_write/close_read)

Added by nagachika (Tomoyuki Chikanaga) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:47742]

Description

pipe と close_write/close_read に関する一連の修正がバックポート必要か確認します。
備忘のためチケット化。

Associated revisions

Revision 514878d1
Added by nagachika (Tomoyuki Chikanaga) over 5 years ago

merge revision(s) 43112,43114,43117,43118: [Backport #8980]

    * io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
      fix freed pointer access when it is in use by other threads, and get
      rid of potential memory/fd leak.

    * io.c (rb_io_close_write): detach tied IO for writing before closing
      to get rid of race condition.  [ruby-list:49598]

    * io.c (rb_io_close_read): duplex IO should wait its child process
      even after close_read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 97a5506f
Added by usa (Usaku NAKAMURA) over 5 years ago

merge revision(s) 43112,43114,43117,43118: [Backport #8980]

    * io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
      fix freed pointer access when it is in use by other threads, and get
      rid of potential memory/fd leak.

    * io.c (rb_io_close_write): detach tied IO for writing before closing
      to get rid of race condition.  [ruby-list:49598]

    * io.c (rb_io_close_read): duplex IO should wait its child process
      even after close_read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 43482
Added by usa (Usaku NAKAMURA) over 5 years ago

merge revision(s) 43112,43114,43117,43118: [Backport #8980]

* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
  fix freed pointer access when it is in use by other threads, and get
  rid of potential memory/fd leak.

* io.c (rb_io_close_write): detach tied IO for writing before closing
  to get rid of race condition.  [ruby-list:49598]

* io.c (rb_io_close_read): duplex IO should wait its child process
  even after close_read.

History

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

少なくとも1.9以降は必要なはずです。

#2

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43144.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 43112,43114,43117,43118: [Backport #8980]

* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
  fix freed pointer access when it is in use by other threads, and get
  rid of potential memory/fd leak.

* io.c (rb_io_close_write): detach tied IO for writing before closing
  to get rid of race condition.  [ruby-list:49598]

* io.c (rb_io_close_read): duplex IO should wait its child process
  even after close_read.
#3

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Project changed from Backport200 to Backport193
  • Status changed from Closed to Assigned
  • Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)

1.9 にも必要らしいということで移動しておきます。

#4

Updated by usa (Usaku NAKAMURA) over 5 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r43482.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 43112,43114,43117,43118: [Backport #8980]

* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
  fix freed pointer access when it is in use by other threads, and get
  rid of potential memory/fd leak.

* io.c (rb_io_close_write): detach tied IO for writing before closing
  to get rid of race condition.  [ruby-list:49598]

* io.c (rb_io_close_read): duplex IO should wait its child process
  even after close_read.

Also available in: Atom PDF