develooper Front page | perl.perl5.porters | Postings from August 2018

Re: [perl #133477] perl 5 (v.5.26.1) interpreter crashes on 64-bitWindows

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
August 29, 2018 15:19
Subject:
Re: [perl #133477] perl 5 (v.5.26.1) interpreter crashes on 64-bitWindows
Message ID:
20180829151908.GG24806@iabyn.com
On Wed, Aug 29, 2018 at 04:24:33PM +0200, Tomasz Konojacki wrote:
> 
> However, the commit message doesn't say anything about crashing or float
> line numbers, which makes me think that the fix was accidental.
> 
> I wonder if the bug was actually fixed or maybe it was just hidden. 
> 
> CC-ing Dave to get his opinion.

It appears to be a combination of bugs, all of which were fixed
by my extensive reworking of Perl_sv_vcatpvfn_flags() for 5.28.0.

It's caused by the warn code doing:

	    Perl_sv_catpvf(aTHX_ sv, ", <%" SVf "> %s %" IVdf,
			   SVfARG(PL_last_in_gv == PL_argvgv
                                 ? &PL_sv_no
                                 : sv_2mortal(newSVhek(GvNAME_HEK(PL_last_in_gv)))),
                                (IV)IoLINES(GvIOp(PL_last_in_gv)));


i.e. doing the 'C' variant rather than the 'perl' variant of sprintf,
so it gets its args from a va_list rather than from an array of SVs.

Handling the special-cased %SVf format (which actually expands to "%-p"
triggered a code path where a variable, argsv, got left set on later %'s.
This meant that the later %IVdf (i.e. %ld) was using the "INFILE" SV as
its arg rather than the intended IoLINES(). Which then triggered a second
bug with the poor handling of INF in integer formats.

I haven't fully diagnosed this (life is too short), but I suspect my 100+
commits that worked on Perl_sv_vcatpvfn_flags() will have fixed all the
issues here.


-- 
Red sky at night - gerroff my land!
Red sky at morning - gerroff my land!
    -- old farmers' sayings #14

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