develooper Front page | perl.perl5.porters | Postings from October 2010

Re: [perl #3719] perl_eval_{sv,pv} does not trap syntax errors

Thread Previous | Thread Next
Dave Mitchell
October 3, 2010 12:58
Re: [perl #3719] perl_eval_{sv,pv} does not trap syntax errors
Message ID:
On Mon, Sep 27, 2010 at 12:44:16AM +0200, Leon Timmermans wrote:
> On Mon, Jul 26, 2010 at 3:18 AM, George Greer via RT
> <> wrote:
> > My embed-fu is weak, but it appears to be a simple fix.
> >
> >
> >
> >
> >
> > or attached.
> Disclaimer: I have embed-fu, but not so much internals-fu.
> The G_KEEPERR flag seems to affect eval in at least 3 places
> 1) in doeval, right before compilation is tried.
> 2) in pp_leave, as the very last thing is does. I think this is only run on
> 3) in eval_sv, right after a successful eval.
> I suspect this patch has a wider impact than intended. I don't really
> know if that's really a problem though.

The patch is wrong, unfortunately. It only "works" in some circumstances
because it exploits another bug whereby G_KEEPERR still sets $@ sometimes,

In particular: under the original fix, if $@ wasn't null when calling
eval_pv(pv,TRUE), it would croak, even if pv compiled and ran okay.

I've fixed the original bug with commit


and fixed the G_KEEPERR issue with


> Also, the fact that this G_KEEPERR behavior of eval_sv is not
> documented bothers me.

I've fixed that with


Thank God I'm an atheist.....

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