develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #55084] Debugger loops infinitely with __DIE__ and DESTROY

From:
James E Keenan via RT
Date:
May 24, 2012 18:35
Subject:
[perl #55084] Debugger loops infinitely with __DIE__ and DESTROY
Message ID:
rt-3.6.HEAD-7788-1337909699-1275.55084-15-0@perl.org
On Fri May 30 10:15:59 2008, Peter@PSDT.com wrote:
> If you run the following, be prepared to kill it from another window:
> 
>    #!/usr/bin/perl -d
> 
>    sub Foo::new { bless {} , "Foo" }
>    sub Foo::DESTROY { 1 }
> 
>    BEGIN {
>      $SIG{__DIE__} = sub {
>        my $foo = Foo->new;
>        exit;
>      };
>    }
> 
> It will print the line
> 
>    Foo::DESTROY(/tmp/foo:4):       sub Foo::DESTROY { 1 }
> 
> repeatedly and be unstoppable from its own window.
> 
> This goes waaaay back.  It behaves as described in 5.10.0, 5.8.8, 
> 5.6.1.  In 5.004 it just hangs.  Same behavior on Linux and Solaris.
> 

I tried this tonight on both Darwin/PPC and Linux/i386, both with Perl
5.16.0.  I got the output Peter described, but on each machine the
process segfaulted after about 1.5 seconds.  I couldn't move quickly
enough to kill the process myself.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=55084



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