develooper Front page | perl.perl5.porters | Postings from September 2013

RE: [perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux

Thread Next
John Unsworth
September 10, 2013 15:40
RE: [perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux
Message ID:
Hi Tony,

We do use G_KEEPERR because we want to report error details. I did send a response to Jim - but the example I tried to create on Windows crashes on the call to CLEAR_ERRSV() and I don't know why.


-----Original Message-----
From: Tony Cook via RT [] 
Sent: 10 September 2013 02:46
Subject: [perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux

On Thu Sep 05 04:18:28 2013, wrote:
> So it seems that the implementation of ERRSV has changed in that at
5.14 it
> is not initially defined, hence I assume that sv_setsv(ERRSV,
> was trying to set an undefined variable and thus causing the error. 
> The correct fix seems to be to change this to CLEAR_ERRSV(). Shouldn't 
> this be mentioned in the embed documentation? There is no mention at 
> all of how to reset the error variable.

Why do you need to clear ERRSV?

It should be cleared by eval_sv() or call_sv() on success (unless you use G_KEEPERR).

While I think documenting CLEAR_ERRSV() is useful, I'm not sure where you'd need to use it outside the core.

The example code Jim asked for would be useful.


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