5.19.4 - 5.25.2: -x line offset error #15413
Created by firstname.lastname@example.org
In 5.19.4 it seems an line number offset error when using "-x" sneeked in and it's still present in 5.25.2.
Running the below script with "perl -x" reports the erroneous line to be line 7, but it is line 6.
-- cut --
In 5.19.3 and earlier the line number is reported correctly.
[perl #118931] Fix line number bug
Commit 2179133 (in 5.19.2) introduced this line number bug when it
The warning should say line 3, not 2.
Before 2179133, the parser’s line-reading algorithm work strictly in
To be able to look past a newline to find => after a keyword, the
• It has to be possible to append more lines of input to the buffer
Commit 2179133 did those two things.
It did not, however, make the lexer increment the line number when
Fixing it to do that requires that lex_start be adjusted, too. When
Now that it no longer ignores the semicolon, it will end up incre-
In one place (skipspace2), the mad-specific code was setting PL_bufptr
:040000 040000 f48a7e36a96074f78be759dfeeffa6f1f26f039b 94d0f19069694ed4b68f332b6b2d707cfa6b3bce M t
Why this only happens under -x, however, is beyond me.
On Fri Jul 01 17:36:50 2016, email@example.com wrote:
It’s...complicated. I wrote a barely comprehensible explanation in the commit message for b3dd0ab, which fixes the bug.
I think the patch should be a candidate for backporting to 5.22 and 5.24 (and 5.20 if we are still doing that).
On Sat Jul 02 00:11:50 2016, sprout wrote:
5.20 is not supported. We only support two versions from recent stable.
If we make another release of 5.20 (only in case of important security issues), we can try and include this. I'll make a note of it. Thank you.
Thank you for filing this report. You have helped make Perl better.
With the release today of Perl 5.26.0, this and 210 other issues have been
Perl 5.26.0 may be downloaded via:
If you find that the problem persists, feel free to reopen this ticket.