develooper Front page | perl.perl5.porters | Postings from October 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:
October 26, 2013 08:05
Subject:
[perl #119617] PerlEmbed 5.14: sv_setsv(ERRSV, &PL_sv_undef); crashes on Linux
Message ID:
rt-4.0.18-14228-1382774704-395.119617-15-0@perl.org
On Tue Sep 10 18:17:00 2013, sprout wrote:
> 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().

Could you try the same program on Linux?

> > 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?

Re-reading your messages, I see that vTHX->Ierrgv is only zero on Windows.

On Mac OS X, that program just works.  I tested the attached modified script with 5.19.5 and 5.14.4, and I get this:

loaded OK
Hello
Undefined subroutine &test::fred called at test.pl line 7.

Could you try reducing the app on the same architecture it crashes on?

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/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