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
From:
Father Chrysostomos via RT
Date:
September 11, 2013 01:17
Subject:
[perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux
Message ID:
rt-3.6.HEAD-1873-1378862220-1527.119617-15-0@perl.org
On Tue Sep 10 15:59:32 2013, tonyc wrote:
> On Tue Sep 10 08:40:34 2013, john.unsworth@cp.net 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
<http://www.nntp.perl.org/group/perl.perl5.porters/;msgid=000001ceab1a$29aebd20$7d0c3760$@cp.net>:

> 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
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119617

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About