Project

General

Profile

Actions

Backport #8063

closed

r39681 - use poll() instead of select(). のバックポート

Added by kosaki (Motohiro KOSAKI) about 11 years ago. Updated about 11 years ago.


Description

現状、1.9.3と2.0にはファイルを FD_SETSIZE 以上開いた状況でfork等によりタイマースレッドの生成が走ると、タイマースレッド内の
FD_SET()でメモリを壊しています。
または、2.0でLinux、だと -D_FORTIFY_SOURCE=2 でコンパイルされているのでメモリ壊す代わりにランタイムチェックでabortするはず。
UbuntuだとデフォルトでFORITIFYされているので、1.9.3でもabortかな。

よって、修正である r39681をバックポートしてもらいたく。

Actions #1

Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago

r39681 のために r39680 も入れないときれいに入らないので、まとめてバックポートします。

Actions #2

Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago

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

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


merge revision(s) 39680,39681: [Backport #8063]

* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
  ifdef condtions.

* thread_pthread.c (timer_thread_sleep): use poll() instead of
  select(). select doesn't work if timer_thread_pipe[0] is
  greater than FD_SETSIZE.

* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): add a dependency
  against poll.
Actions

Also available in: Atom PDF

Like0
Like0Like0