diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 034dac570c..dc99a8c463 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3549,4 +3549,20 @@ __END__ end end end + + def test_select_leak + assert_no_memory_leak([], <<-"end;", <<-"end;", rss: true, timeout: 60) + r, w = IO.pipe + rset = [r] + wset = [w] + Thread.new { IO.select(rset, wset, nil, 0) }.join + end; + 20_000.times do + th = Thread.new { IO.select(rset, wset) } + Thread.pass until th.stop? + th.kill + th.join + end + end; + end end |