Small Leak in Fileno Bookkeeping For STDIO RubyIOs
--------------------------------------------------
Key: JRUBY-6137
URL: https://jira.codehaus.org/browse/JRUBY-6137
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6.4
Reporter: Ben Browning
Assignee: Thomas E Enebo
Priority: Minor
Every time RubyIO's constructor that accepts a STDIO as the 2nd argument it
called it calls runtime.putFilenoMap to keep track of internal to external
filenos for these special streams. This ultimately ends up putting key/value
integer pairs in Ruby's filenoExtIntMap and filenoIntExtMap, the latter which
grows in size every time this RubyIO constructor is called. When the RubyIO
gets closed its entry in filenoIntExtMap does not get cleaned up and thus that
map has the potential to grow indefinitely.
The bug is marked as minor because this is only an issue if large numbers of
STDIO RubyIOs are created in a single runtime. The proposed fix is to delete
the entries out of filenoIntExtMap in OpenFile's finalize method or somewhere
else appropriate that gets called on both close and finalization of RubyIOs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email