Runtime errors seem to be off by one these days. Anybody play with line
numbering recently?
Given this source:
.sub foo :main
P0 = new .Hash
P1 = P0['x']
unless P1 goto no
print "yes\n"
no:
.end
The message claims line number 3:
Null PMC access in get_bool()
current instr.: 'foo' pc 7 (/tmp/line.pir:3)
Whereas the actual error is on line 4.
--
Chip Salzenberg <ch...@pobox.com>
Not "these days" - since a long time. There's a ticket [1] for that already.
leo
[1] http://rt.perl.org/rt3/Public/Bug/Display.html?id=38594
and WTF - who dared to close that (coke--)
This isn't the same error, it's a different one.
Given code like this:
.sub foo :main
print "hello kitty\n"
P1 = find_global 'q'
print P1
.end
we get the same failure mode in svn head and r13182, reporting the
correct line #3.
However, using something more like chip's example (can't use chips
example exactly in r13182 because None was still around then)
.sub foo :main
null P1
unless P1 goto eek
eek:
.end
We see that this fails the same way in *both*, reporting the error on
line 2. (a line early, just like chip's)
So, this is a new bug, and the old one can stay dead.
Regards.
--
Will "Coke" Coleda
wi...@coleda.com
Do you intend to have a new ticket for each PIR snippet with wrong line
numbers? I should have made it more clear in #38594 - the one example is just
an axample, but by far not the only one with wrong line numbers.
leo
If too many RT tickets is our largest problem then ... well, anyway, it's
not.
When the apparent & reported bug was fixed, closing the ticket was
right. Besides, it's not like they aren't a renewable resource. :-)
--
Chip Salzenberg <ch...@pobox.com>