Grokbase
x

Bug in Safe 2.21 (or Opcode) re propagating exceptions

View PostFlat  Thread  Threaded | Next >
Tim Bunce Bug in Safe 2.21 (or Opcode) re propagating exceptions
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
In the context of PostgreSQL PL/Perl, which uses Safe, David Wheeler
pointed me to a bug in Safe 2.21. The effect is that an exception thrown
from a closure gets lost.

I've boiled it down to this:

    perl -MSafe -e 'Safe->new->reval(q{sub { die @_ }})->(qq{ok\n})'

That should die with "ok" but doesn't on 5.10.1 or 5.11.4 or 5.8.6.
It does die, correctly, on a whole bunch of other versions I have
lying around locally.

This is a heads up as I'm starting to dig. Any thoughts most welcome...

Tim.

Thread : Bug in Safe 2.21 (or Opcode) re propagating exceptions
1)
Tim Bunce In the context of PostgreSQL PL/Perl, which uses Safe, David Wheeler pointed me to a bug in Safe...
2)
Tim Bunce Turns out to be a threads issue. Fails with USE_ITHREADS, passes otherwise. Still digging... Tim....
3)
Nicholas Clark git bisect is probably your friend. There's a section describing how to do it in...
4)
Tim Bunce Thanks. But I din't think a bisect will be helpful here. Safe 2.20+ fails for all perl versions...
5)
Tim Bunce I've attached a more complete patch. Rafaƫl, I think this is ready to apply and release as Safe...
paperclip
6)
Alex Hunsaker Goodness... For how simple I thought this idea was originally it sure has caused a lot of grief :(...
7)
Nicholas Clark I've forwarded it all to rt.perl.org so that it doesn't get lost....
8)
Rafael Garcia-Suarez er thrown k\n})' me... erwise. od#l626 Thanks, applied to bleadperl. I'll release a new Safe to...
spacer
View PostFlat  Thread  Threaded | Next >