Project

General

Profile

Actions

Bug #14929

closed

[PATCH] thread.c (do_select): fix leak on exception

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

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:88037]

Description

thread.c (do_select): fix leak on exception

When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a memory leak.  Wrap up all the
FD sets into a Ruby object to ensure the GC can release an
allocations made for rb_fdset_t.

This leak existed since Ruby 2.0.0 (r36430)

I found this bug because I was tracking down a problem
while working on timer-thread elimination.


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0