On Tue, Feb 09, 2010 at 02:41:44PM +0000, Tim Bunce wrote:
> On Mon, Feb 08, 2010 at 04:38:48PM +0000, Tim Bunce wrote:
> > 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...
>
> Turns out to be a threads issue. Fails with USE_ITHREADS, passes otherwise.
> (I had a mix of perl lying around with various configs.)
>
> Still digging...
git bisect is probably your friend.
There's a section describing how to do it in perlrepository.pod:
http://perl5.git.perl.org/perl.git/blob/0972ecdf:/pod/perlrepository.pod#l626Nicholas Clark