develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #126991] integer overflow in line number tracking reported bycaller()

Thread Previous
From:
Tony Cook via RT
Date:
June 12, 2019 05:45
Subject:
[perl #126991] integer overflow in line number tracking reported bycaller()
Message ID:
rt-4.0.24-2563-1560318342-1330.126991-15-0@perl.org
On Wed, 20 Jan 2016 16:05:38 -0800, tonyc wrote:
> > This still wouldn't give us full 32-bit unsigned line numbers since
> > gp_line in a GP is only 31 bits:
> > 
> > GV *        gp_egv;         /* effective gv, if *glob */
> > PERL_BITFIELD32 gp_line:31; /* line first declared at (for -w) */
> > PERL_BITFIELD32 gp_flags:1;
> > 
> > which results in fun like:
> > 
> > $ ./perl -we '#line 3000000000' -e 'if ($x = 1) { }'
> > Found = in conditional, should be == at -e line 3000000000.
> > Name "main::x" used only once: possible typo at -e line 852516352.
> 
> This isn't fixed and I don't think it's worth fixing.

Do we want to do anything else for this ticket?

I can see three options:

a) reject the remaining issues (line numbers >=2**31 not preserved in GVs, >2**32 not preserved at all) and close the ticket

b) mitigate it somehow, eg. warn or croak on line numbers >=2**31.

c) leave the ticket open, even if we don't plan to do anything

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=126991

Thread Previous


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