Skip Menu |

This queue is for tickets about the AnyEvent-Worker CPAN distribution.

Report information
The Basics
Id: 98909
Status: open
Priority: 0/
Queue: AnyEvent-Worker

People
Owner: Nobody in particular
Requestors: josh.kronengold [...] experian.com
Cc:
AdminCc:

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



Subject: Error leakage
Date: Mon, 15 Sep 2014 16:46:22 -0400
To: <bug-AnyEvent-Worker [...] rt.cpan.org>
From: Joshua Kronengold <josh.kronengold [...] experian.com>
$@ is not localized before success callbacks. Because of this, if $@ accidentally gets set, then success callbacks will erroneously receive errors from entirely different parts of the stack. Solution: Localize $@ before -all- callbacks (this requires a minor change to the tests).
On 2014-09-15 13:45:09, josh.kronengold@experian.com wrote: Show quoted text
> $@ is not localized before success callbacks. > > Because of this, if $@ accidentally gets set, then success callbacks > will > erroneously receive errors from entirely different parts of the stack. > > Solution: Localize $@ before -all- callbacks (this requires a minor > change to > the tests).
If you use Try::Tiny, all the crazy edge cases with using $@ are taken care of for you.
Subject: Re: [rt.cpan.org #98909] Error leakage
Date: Mon, 15 Sep 2014 19:40:20 -0400
To: "bug-AnyEvent-Worker [...] rt.cpan.org" <bug-AnyEvent-Worker [...] rt.cpan.org>,Karen Etheridge via RT <bug-AnyEvent-Worker [...] rt.cpan.org>,"Kronengold, Josh" <Josh.Kronengold [...] experian.com>
From: Joshua Kronengold <mneme [...] cheetahmail.com>
On September 15, 2014 6:15:14 PM EDT, Karen Etheridge via RT <bug-AnyEvent-Worker@rt.cpan.org> wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=98909 > > >On 2014-09-15 13:45:09, josh.kronengold@experian.com wrote:
>> $@ is not localized before success callbacks. >> >> Because of this, if $@ accidentally gets set, then success callbacks >> will >> erroneously receive errors from entirely different parts of the
>stack.
>> >> Solution: Localize $@ before -all- callbacks (this requires a minor >> change to >> the tests).
> > >If you use Try::Tiny, all the crazy edge cases with using $@ are taken >care of for you.
That doesn't help if you're trying to catch exceptions in workers, except that you're less likely to poison the global $@ accidentally.