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 <>

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 <>

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, Rémi Perrot <>:
Bug#298089; Package glade-perl. Full text and rfc822 format available.

Acknowledgement sent to David Cho-Lerat <>:
New Bug report received and forwarded. Copy sent to Rémi Perrot <>. Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: David Cho-Lerat <>
To: "Debian Bug Tracking System" <>
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/ 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,,
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+
ii  libxml-parser-perl            2.34-4     Perl module for parsing XML
ii  perl                          5.8.4-6    Larry Wall's Practical

-- no debconf information

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

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

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

Message #10 received at (full text, mbox):

From: Marco Rodrigues <>
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 . 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

Bug archived. Request was from Debbugs Internal Request <> to (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 <>. Last modified: Sat Apr 19 06:37:24 2014; Machine Name:

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