develooper Front page | perl.perl5.porters | Postings from February 2009

[PATCH]Hash::Util::FieldHash leaks SVs

Thread Next
From:
Goro Fuji
Date:
February 28, 2009 00:47
Subject:
[PATCH]Hash::Util::FieldHash leaks SVs
Message ID:
efb9c59b0902280047r7ea079e5ha9f4c3176f781ec2@mail.gmail.com
Hello,

Hash::Util::FieldHash 1.03 leaks SVs which are used as object IDs
stored in mg->mg_obj.

Test::LeakTrace shows this problem:
#!perl -w
use strict;
use Test::More tests => 1;
use Test::LeakTrace 0.06;

use Hash::Util::FieldHash qw(fieldhash);

fieldhash my %hash;
no_leaks_ok{ # or not_leaked() before 0.06
	my $obj = [];
	$hash{$obj}++;
};
__END__

The attached file, FieldHash.patch, will fix it.

Regards,
-- 
Goro Fuji (gfx)

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About