Skip to content

Loading…

$@ not reliable before 5.14 #843

Closed
ambs opened this Issue · 2 comments

2 participants

@ambs
PerlDancer member

Before 5.14 (check perldelta for details) some object needing to be free can make a DESTROY to be called between an eval and the usage of $@, putting some weird content on $@ (for instance, an empty string).

I was hurt by this on a running application on dot cloud.

It is not easy to reproduce. First, you need perl 5.12 or previous. Then, you need an application doing a forward, for instance, then you need to have enough load for Perl to need to free objects. Finally, one need that Perl takes the time to free objects right in that spot.

Although it seems highly improbable, it is not.

@dams suggested an exceptions stack. This might be a good idea. And given D1 is mostly single app, we can even make that stack global or so.

@yanick

@ambs, can you provide more details on where you got bit by that spontaneous mutation of $@?

@yanick

If nobody minds, I'll close this one. We don't have an easy way to reproduce, and I don't think we have the tuits to reimplement a full exception stack system. And if we do, it's an effort that will probably be pushed for Dancer2.

@yanick yanick closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.