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

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

Thread Previous | Thread Next
Father Chrysostomos via RT
September 11, 2013 01:17
[perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux
Message ID:
On Tue Sep 10 15:59:32 2013, tonyc wrote:
> On Tue Sep 10 08:40:34 2013, wrote:
> > 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.
> Sorry, the response didn't make it into request tracker for some reason,
> but I found it in my mailbox.
> Tony

The message is at

> I'm afraid I'm failing miserably with this. I have extracted the
> calls that our code makes into a windows console application but it
> crashes on the call to CLEAR_ERRSV(). Everything else seems to work
> OK if I remove the call. I can see that vTHX->Ierrgv returns zero. I
> have attached the code and test script. It is built against 5.14 from
> ActiveState. Let me know what you suggest.

The ERRSV changes between 5.10 and 5.14 actually make it safer.  In 5.10
CLEAR_ERRSV would crash if GvSV(PL_errgv) (aka
PL_errgv->sv_u.svu_gp->gp_sv) were null.  In 5.14 GvSVn is used (with
the final n), which vivifies a new SV for that slot if it is null.

If vTHX->Ierrgv is giving you zero, then the ERRSV changes are a red
herring.  Is it possible for you to trace the value of vTHX->Ierrgv to
see when it changes?  Would you be able to do a git bisect?


Father Chrysostomos

via perlbug:  queue: perl5 status: open

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