diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-17 18:22:16 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-17 20:17:33 -0800 |
commit | c6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5 (patch) | |
tree | c9ef37bd618c3e964de2e2e5bae97888094531af /op.c | |
parent | e2054bceda6db6aa9644dfd39b55e7f06bcbbdce (diff) | |
download | perl-c6fb3f6e3e5160581b78d87d4c62f42ef3cc0db5.tar.gz |
[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.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -9720,7 +9720,8 @@ Perl_ck_length(pTHX_ OP *o) case OP_PADHV: case OP_PADAV: name = varname( - NULL, hash ? '%' : '@', kid->op_targ, NULL, 0, 1 + (GV *)PL_compcv, hash ? '%' : '@', kid->op_targ, + NULL, 0, 1 ); break; case OP_RV2HV: |