Skip Menu |

This queue is for tickets about the POE-Component-Generic CPAN distribution.

Report information
The Basics
Id: 27452
Status: resolved
Priority: 0/
Queue: POE-Component-Generic

People
Owner: Nobody in particular
Requestors: dsnopek [...] gmail.com
Cc:
AdminCc:

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



Subject: Bug can cause memory leak (Patch included!)
This bug is activated when calling a function whose result is *not* going to the current session, for example: $generic->func({ session => 'alias', event => 'result' }); In POE::Component::Generic::__request(), refcount_increment() is always called on $sender, even if (like in the above example) the result event will go to a different session. Since in POE::Component::Generic::response(), refcount_decrement() is called on the correct session, the $sender will always have its refcount set too high, and can lead to that session never being stopped. The attached patch fixes POE::Component::Generic::__request() to refcount_increment() the correct session. Please apply and make a new release at your earliest convenience! Thank you, David Snopek.
Subject: Generic.pm.patch
--- Generic.pm.old 2007-06-05 12:50:31.000000000 -0500 +++ Generic.pm 2007-06-05 13:52:38.000000000 -0500 @@ -330,7 +330,7 @@ # if we have an event to report to...make sure it stays around if ($hash->{event}) { - $poe_kernel->refcount_increment( $sender => $self->{name} ); + $poe_kernel->refcount_increment( $params->{session} => $self->{name} ); } if( $self->{callback_map}{$class}{ $method } ) {
From: GWYN [...] cpan.org
On Tue Jun 05 15:00:01 2007, DSNOPEK wrote: Show quoted text
> > This bug is activated when calling a function whose result is *not* > going to the current session, for example:
Ya got me! Patch applied. 0.1001 should be on CPAN soon. Thank you for this bug report!
Closing ticket.