develooper Front page | perl.perl5.porters | Postings from June 2017

Re: [perl #123738] eval {} still clobbers $@ in a DESTROY

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 5, 2017 14:23
Subject:
Re: [perl #123738] eval {} still clobbers $@ in a DESTROY
Message ID:
20170605142334.GA4013@iabyn.com
On Wed, Feb 04, 2015 at 09:51:23PM -0800, felipe@felipegasper.com wrote:
> # New Ticket Created by  felipe@felipegasper.com 
> # Please include the string:  [perl #123738]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=123738 >
> 
> 
> 
> This is a bug report for perl from felipe@felipegasper.com,
> generated with the help of perlbug 1.39 running under perl 5.14.4.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> #!/usr/bin/env perl
> 
> package Destroyer;
> 
> sub new { bless {} }
> 
> sub DESTROY { eval {} }
> 
> package main;
> 
> eval {
>    for ( Destroyer->new() ) {
>        die 'haha';
>    }
> };
> print "The error from Perl $^V: $@";
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The above code demonstrates that the change in Perl 5.14 that was intended to
> ensure that DESTROY handlers don’t clobber $@ did not account for this case.

Now fixed v5.27.0-119-gb66d79a

-- 
Technology is dominated by two types of people: those who understand what
they do not manage, and those who manage what they do not understand. 

Thread Previous | Thread Next


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