[SCM] Debian package checker branch, master, updated. 2.5.11-160-g48c5ad8
The following commit has been merged in the master branch:
commit 48c5ad8286c6c2cb78eddf47665097631ec4556f
Author: Niels Thykier <niels@thykier.net>
Date: Sat Feb 16 12:41:27 2013 +0100
L::C::Package: Fix memory leak caused by index ref cycle
In commit ff44271, indices converted their values to L::Path objects.
Unfortunately, the "children" list for the root entry contained
itself. This created a ref-cycle and by extension a very nasty memory
leak for the "archive-wide" runs.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index 3c9bc13..86ea262 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -183,6 +183,9 @@ lintian (2.5.12) UNRELEASED; urgency=low
+ [NT] Recognise packages in section "metapackages" as a
metapackage. Thanks to Axel Beckert for the report.
(Closes: #698610)
+ * lib/Lintian/Collect/Package.pm:
+ + [NT] Ensure the "root" entry of indices do not contain itself.
+ (Closes: #695866)
* lib/Lintian/Command/Simple.pm:
+ [NT] Use constant time lookup access instead of linear scan with
"hashref" wait.
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 3a693e6..d8c7af5 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -306,8 +306,10 @@ sub _fetch_index_data {
$file{dirname} = $parent;
$file{basename} = $base;
$children{$parent} = [] unless exists $children{$parent};
- push @{ $children{$parent} }, $name;
-
+ # Ensure the "root" is not its own child. It is not really helpful
+ # from an analysis PoV and it creates ref cycles (and by extension
+ # leaks like #695866).
+ push @{ $children{$parent} }, $name unless $parent eq $name;
}
if (%rhlinks) {
foreach my $file (sort keys %rhlinks) {
--
Debian package checker
Reply to: