Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 55612
Status: resolved
Priority: 0/
Queue: IPC-Run

People
Owner: TODDR [...] cpan.org
Requestors: pavel.l.georgiev [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Fix for #13660
Date: Mon, 15 Mar 2010 17:32:33 -0700
To: bug-IPC-Run [...] rt.cpan.org
From: Pavel Georgiev <pavel.l.georgiev [...] gmail.com>
Hello, I hit an old issue: http://rt.cpan.org/Public/Bug/Display.html?id=13660 and I've been digging into IPC::Run. I noticed that _new_internal() inside IO.pm creates circular references which lead to the observed leak. Such references are created on line 163, 182, 186, 204, 206, 210, 212, the closures that are pushed to $self{FILTERS} contain references to $self, so that the reference count on $self does never go to 0 and it is never freed. I'm attaching a patch that sets $self{FILTERS} to undef in _cleanup inside IO.pm, so that the object can be destroyed by the garbage collector. That works for me and the test code inside the bug report no longer leaks. Hope that helps and makes it into the main release, Pavel

Message body is not shown because sender requested not to inline it.

I can't really find a valid test case for this, but I see no reason not to cleanup the filters on _cleanup call.
will be a part of 0.85
Turns out this breaks tests. I'm going to have to remove this from 0.85 for now as it's supposed to be a quick release
Ticket migrated to github as https://github.com/toddr/IPC-Run/issues/81