Skip Menu |
 

This queue is for tickets about the Devel-Leak-Object CPAN distribution.

Report information
The Basics
Id: 49534
Status: open
Priority: 0/
Queue: Devel-Leak-Object

People
Owner: Nobody in particular
Requestors: vasek.balcar [...] spolecne.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: looking for super method of the same package in DESTROY for non tracked object
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1324
Download (untitled) / with headers
text/plain 1.2k
I believe there is a bug related to the following logic in overridden DESTROY method: ... \$original = \$class; } ... my \$super = \$Devel::Leak::Object::DESTROY_NEXT{\$original}->{'$class'}; unless ( defined \$super ) { die "Failed to find super-method for class \$class in package $class"; } imagine an object which hasn't been tracked, but another object(s) of the same class (which do have the original DESTROY) have been tracked - so the class got the overridden DESTROY. So for non tracked object the call will be made on \$super = \$Devel::Leak::Object::DESTROY_NEXT{\$original}->{'$class'}; which effectively searches for DESTROY_NEXT{$X}->{$X} - and failing later with die "Failed to find super-method for class ... see the following code to demonstrate that. Sorry it is a bit artificial, since here I have to use the explicit DESTROY call. I wasn't able to use my real code where the explicit DESTROY is not called - it would be too complex). I also think the problem is specifically affecting the FileHandle objects, since they are spawned sooner then bless is overridden. #!/usr/bin/perl -w use strict; use Devel::Leak::Object qw(GLOBAL_bless); use FileHandle; $SIG{__DIE__} = sub { print "Report hidden die: ".$_[0]}; my $f = new FileHandle(); $f->DESTROY();
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-27252-1252447682-22.49534-4-0 [...] rt.cpan.org>
References: <RT-Ticket-49534 [...] rt.cpan.org> <rt-3.6.HEAD-27252-1252447682-22.49534-4-0 [...] rt.cpan.org>
Reply-To: adam [...] ali.as
Message-ID: <b8cb49a40909082114j33dfeb91na41a0fb5ebd3468c [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 2BC8519B8243 for <bug-Devel-Leak-Object [...] rt.cpan.org>; Wed, 9 Sep 2009 00:14:52 -0400 (EDT)
Received: (qmail 26606 invoked by uid 103); 9 Sep 2009 04:14:51 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Sep 2009 04:14:51 -0000
Received: from mail-px0-f174.google.com (HELO mail-px0-f174.google.com) (209.85.216.174) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 08 Sep 2009 21:14:46 -0700
Received: by pxi4 with SMTP id 4so626990pxi.3 for <bug-Devel-Leak-Object [...] rt.cpan.org>; Tue, 08 Sep 2009 21:14:43 -0700 (PDT)
Received: by 10.142.1.9 with SMTP id 9mr712061wfa.102.1252469683126; Tue, 08 Sep 2009 21:14:43 -0700 (PDT)
Delivered-To: cpan-bug+Devel-Leak-Object [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #49534] looking for super method of the same package in DESTROY for non tracked object
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=hCDwOFcGoWUt3o03al/08+5cAPlIPjpR1gQHknhnz9YtYUkK77p/5ZQXBHKJBnpr8W IeifPJ32XCV8BD+7ZzEeEY/9ljeABeTz5nz7AJ5mIEiwo9203P7mOqKaeEblIecDGvw+ ZMENg2mAczlPZQBIwrObNzh7kfnIm6C0utGDs=
Return-Path: <adamkennedybackup [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nnMpDMwaWj6R+gp7RWGsTrNvMRtNLHM6HTSHJczxdz4=; b=qO7InBHubDcprSzqkbmMRy9OTFGyifvOq3e3Meh6NyGKln4PeWJXJ7kzV2pCUEtVXZ tqxfN/MWXLMwVj9OlIkxoTJOeEDgnKhbg/Ak8S6rVJpPqt7nOPSUtixcYNKlDqkD6x6S PWP00BamCcUX1aXgkNEq17H3m5t9tfgvqTQro=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Devel-Leak-Object [...] rt.cpan.org
Date: Wed, 9 Sep 2009 14:14:43 +1000
X-Spam-Level: *
To: bug-Devel-Leak-Object [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
RT-Message-ID: <rt-3.6.HEAD-27252-1252469702-1968.49534-0-0 [...] rt.cpan.org>
Content-Length: 1961
Download (untitled) / with headers
text/plain 1.9k
Would you like commit to try and fix it? Adam K 2009/9/9 Vasek Balcar via RT <bug-Devel-Leak-Object@rt.cpan.org>: Show quoted text
> Tue Sep 08 18:08:02 2009: Request 49534 was acted upon. > Transaction: Ticket created by VASEK >       Queue: Devel-Leak-Object >     Subject: looking for super method of the same package in DESTROY for non >  tracked object >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: vasek.balcar@spolecne.cz >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=49534 > > > > I believe there is a bug related to the following logic in overridden DESTROY method: > > ... >       \$original = \$class; >    } > ... >    my \$super = \$Devel::Leak::Object::DESTROY_NEXT{\$original}->{'$class'}; >    unless ( defined \$super ) { >        die "Failed to find super-method for class \$class in package $class"; >    } > > imagine an object which hasn't been tracked, but another object(s) of the same class (which > do have the original DESTROY) have been tracked - so the class got the overridden DESTROY. > > So for non tracked object the call will be made on \$super = > \$Devel::Leak::Object::DESTROY_NEXT{\$original}->{'$class'}; > > which effectively searches for DESTROY_NEXT{$X}->{$X} - and failing later with > >  die "Failed to find super-method for class ... > > see the following code to demonstrate that. Sorry it is a bit artificial, since here I have to use > the explicit DESTROY call. I wasn't able to use my real code where the explicit DESTROY is > not called - it would be too complex). > > I also think the problem is specifically affecting the FileHandle objects, since they are > spawned sooner then bless is overridden. > > #!/usr/bin/perl -w > > use strict; > use Devel::Leak::Object qw(GLOBAL_bless); > use FileHandle; > $SIG{__DIE__} = sub { print "Report hidden die: ".$_[0]}; > > my $f = new FileHandle(); > $f->DESTROY(); > > > >
MIME-Version: 1.0 (Apple Message framework v936)
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.6.HEAD-27252-1252469702-1968.49534-6-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.936)
References: <RT-Ticket-49534 [...] rt.cpan.org> <rt-3.6.HEAD-27252-1252447682-22.49534-4-0 [...] rt.cpan.org> <b8cb49a40909082114j33dfeb91na41a0fb5ebd3468c [...] mail.gmail.com> <rt-3.6.HEAD-27252-1252469702-1968.49534-6-0 [...] rt.cpan.org>
Message-ID: <2945E150-B707-46A8-B12D-9370AE22985A [...] spolecne.cz>
Content-Type: text/plain; charset="utf-8"; delsp="yes"; format="flowed"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 544BC4D8016 for <bug-Devel-Leak-Object [...] rt.cpan.org>; Wed, 9 Sep 2009 02:24:23 -0400 (EDT)
Received: (qmail 15976 invoked by uid 103); 9 Sep 2009 06:24:22 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Sep 2009 06:24:22 -0000
Received: from smtp.nextra.cz (HELO smtp.nextra.cz) (212.65.193.3) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 08 Sep 2009 23:24:16 -0700
Received: from kinko.lan (r3h123.net.upc.cz [213.220.199.123]) (Authenticated sender: vb [...] smtp.nextra.cz) by smtp.nextra.cz (Postfix) with ESMTPA id 78F2276307 for <bug-Devel-Leak-Object [...] rt.cpan.org>; Wed, 9 Sep 2009 08:24:11 +0200 (CEST)
Delivered-To: cpan-bug+Devel-Leak-Object [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #49534] looking for super method of the same package in DESTROY for non tracked object
Return-Path: <vasek.balcar [...] spolecne.cz>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Devel-Leak-Object [...] rt.cpan.org
Date: Wed, 9 Sep 2009 08:24:08 +0200
X-Spam-Level: *
To: bug-Devel-Leak-Object [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Vasek Balcar <vasek.balcar [...] spolecne.cz>
RT-Message-ID: <rt-3.6.HEAD-27252-1252477475-850.49534-0-0 [...] rt.cpan.org>
Content-Length: 436
Download (untitled) / with headers
text/plain 436b
Hi Adam, sure, BTW this is what seemed to help for me: - my \$super = \$Devel::Leak::Object::DESTROY_NEXT{\$original}- Show quoted text
>{'$class'};
+ my \$super = \$original eq '$class' ? '':\ $Devel::Leak::Object::DESTROY_NEXT{\$original}->{'$class'}; -- vasek On 9. Sep, 2009, at 06:15, Reserved Local Account via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=49534 > > > Would you like commit to try and fix it? > > Adam K


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.