This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123737] Fix assertion failure with 0${
authorFather Chrysostomos <sprout@cpan.org>
Fri, 6 Feb 2015 16:25:14 +0000 (08:25 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 6 Feb 2015 17:14:21 +0000 (09:14 -0800)
commit488bc5795891132d29daec7a860cab2a6266230c
treefcb54d50df52b5936fe6bf710b2741fea1192130
parenteb82332cb71f48a5a63aa48dda0f6f55ee333ecb
[perl #123737] Fix assertion failure with 0${

S_no_op, which displays ‘Foo found where operator expected’, assumes
that PL_bufptr points to the beginning of the token, but that was not
the case for ${ at the end of a line.  The attempt to read more into
the buffer would make PL_bufptr point to the end of the line.  This
meant it would use a negative string length when generating the
‘(Missing operator before foo?)’ text, only accidentally escaping a
crash.  On debugging builds, it failed an assertion.
t/lib/croak/toke
toke.c