Debian Bug report logs - #298089
glade-perl: Circular reference in Glade::PerlSource causes memory leak

version graph

Package: glade-perl; Maintainer for glade-perl is (unknown);

Reported by: David Cho-Lerat <david.lerat@asterion.fr>

Date: Fri, 4 Mar 2005 16:18:03 UTC

Severity: important

Found in version 0.61-1

Fixed in version 0.61-1.1+rm

Done: Marco Rodrigues <gothicx@sapo.pt>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Rémi Perrot <rperrot@debian.org>:
Bug#298089; Package glade-perl. Full text and rfc822 format available.

Acknowledgement sent to David Cho-Lerat <david.lerat@asterion.fr>:
New Bug report received and forwarded. Copy sent to Rémi Perrot <rperrot@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: David Cho-Lerat <david.lerat@asterion.fr>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: glade-perl: Circular reference in Glade::PerlSource causes memory leak
Date: Fri, 04 Mar 2005 17:04:07 +0100
[Message part 1 (text/plain, inline)]
Package: glade-perl
Version: 0.61-1
Severity: important


In Glade::PerlSource, specifically in
/usr/share/perl5/Glade/PerlSource.pm line 885,
this statement :

${indent}\$self->FORM->{'OBJECT'} = (\$self);

generates in the user code :

$self->FORM->{'OBJECT'} = ($self);

which, in turn, by way of AUTOLOADing, is
equivalent to :

$self->{FORM}->{OBJECT} = $self;

and therefore creates a circular reference
from the referent pointed to by $self
to itself.

As the generated destructor (sub DESTROY)
is empty and does not break this reference,
the referent is never freed, which causes
a memory leak.

Another memory leak is introduced by the fact
that, in the same source, PerlSource.pm,
line 889, is found :

${indent}\$__PACKAGE__::all_forms->{\$self->INSTANCE} = \$self->FORM;

which, in the generated code, reads :

$__PACKAGE__::all_forms->{$self->INSTANCE} = $self->FORM;

This does *not* parse as its author expected, as it creates
a reference to an anonymous hash in the package named
'__PACKAGE__', and *not* the current package.
This in itself is not a problem, the real problem being that
this anonymous hash pointed to by $__PACKAGE__::all_forms
is never freed either, which causes a second memory leak.


-- System Information:
Debian Release: 3.1
 APT prefers testing
 APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)

Versions of packages glade-perl depends on:
ii  libglade-perl                 0.61-1     Glade-perl runtime modules
ii  libgtk-perl                   0.7009-2   Perl module for the gtk+
library
ii  libxml-parser-perl            2.34-4     Perl module for parsing XML
files
ii  perl                          5.8.4-6    Larry Wall's Practical
Extraction

-- no debconf information

[signature.asc (application/pgp-signature, attachment)]

Reply sent to Marco Rodrigues <gothicx@sapo.pt>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to David Cho-Lerat <david.lerat@asterion.fr>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 298089-done@bugs.debian.org (full text, mbox):

From: Marco Rodrigues <gothicx@sapo.pt>
To: 298089-done@bugs.debian.org
Subject: glade-perl has been removed from Debian, closing #298089
Date: Mon, 5 May 2008 13:24:58 +0100
Version: 0.61-1.1+rm

The glade-perl package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.

For more information about this package's removal, read
http://bugs.debian.org/453495 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.

--
Marco Rodrigues
http://Marco.Tondela.org




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 11 Aug 2008 10:53:56 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 06:37:24 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.