Skip Menu |

This queue is for tickets about the Net-SNMP CPAN distribution.

Report information
The Basics
Id: 80251
Status: new
Priority: 0/
Queue: Net-SNMP

People
Owner: Nobody in particular
Requestors: JHTHORSEN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: v6.0.1
Fixed in: (no value)



Hi, Looks like Net::SNMP is leaking memory. I was testing my own module for leaks an spotted this: # Failed test at t/basic.t line 59. # Cycle #1 # Mojo::SNMP A->{_pool} => %B # %B->{1.2.3.5|v3||foo} => Net::SNMP C # Net::SNMP C->{_pdu} => Net::SNMP::PDU D # Net::SNMP::PDU D->{_callback} => &E # closure &E, $this => $F # $F => Net::SNMP C The leak can be fixed by adding Scalar::Util::weaken($this); to line 2515 in Net/SNMP.pm, _perform_discovery(). I also suspect more leaks, since I cannot see any use of Scalar::Util::weaken, but I see many anon subs closing over $this.