[perl #106726] Don’t crash on length(@arr) warning
authorFather Chrysostomos <sprout@cpan.org>
Wed, 18 Jan 2012 02:22:16 +0000 (18:22 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 18 Jan 2012 04:17:33 +0000 (20:17 -0800)
commitc6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5
treec9ef37bd618c3e964de2e2e5bae97888094531af
parente2054bceda6db6aa9644dfd39b55e7f06bcbbdce
[perl #106726] Don’t crash on length(@arr) warning

The RT ticket blames this on 676a678ac, but it was actually commit
579333ee9e3.  676a678ac extended this problem to evals (and modules),
but it already occurred in the main program.

This crashes:

    ./miniperl -Ilib -we 'sub {length my @forecasts}'

because it is trying to find the variable name for the warning in the
CV returned by find_runcv, but this is a *compile-time* warning, so
using find_runcv is just wrong.

It ends up looking for the array in PL_main_cv’s pad, instead of
PL_compcv.
op.c
sv.c
t/op/length.t