develooper Front page | perl.perl5.porters | Postings from August 2016

Re: DAVEM TPF Grant#2 June 2016 report

Thread Previous
Marcus Holland-Moritz
August 1, 2016 18:21
Re: DAVEM TPF Grant#2 June 2016 report
Message ID:
On 2016-07-07, at 12:32:06 +0100, Dave Mitchell wrote:

> I didn't really do much that stands this month; I just reduced the backlog
> in my p5p mailbox a bit, and worked on several miscellaneous tickets.
> The most noteworthy bugfix related to $@ getting overwritten while exiting
> an eval scope. Earlier work by Zefram had ensured that $@ is assigned to
> in a late stage of scope unwinding, but it turns out that in void context
> or after a die, the temps stack was still being freed *after* $@ had been
> assigned to, which could result in destructors being called that could
> overwrite $@. (My work last year on the context stack meant that this had
> already been fixed for scalar and list context evals). For example:
>     sub DESTROY { $@ = "spurious\n" }
>     eval  { die ((bless []) ?  "foo" : "bar") };
>     print $@; # prints "spurious" rather than "foo"
> I did some refactoring of the eval code and then provided a fix,
> but this broke a Variable::Magic test and has been temporarily reverted

Thanks Dave! +1


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About