diff options
author | Tony Cook <tony@develop-help.com> | 2015-05-05 16:23:59 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-05-05 16:23:59 +1000 |
commit | b12396ac84cef7e23e1aac516fa676165ddfc790 (patch) | |
tree | 612a9d3ae16e682941f5a17137d25559b4ddf262 /pad.c | |
parent | 57e88091a0a502716610aeeade5461e8e8a2192a (diff) | |
download | perl-b12396ac84cef7e23e1aac516fa676165ddfc790.tar.gz |
[perl #124187] don't call pad_findlex() on a NULL CV
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -962,6 +962,10 @@ Perl_pad_findmy_pvn(pTHX_ const char *namepv, STRLEN namelen, U32 flags) Perl_croak(aTHX_ "panic: pad_findmy_pvn illegal flag bits 0x%" UVxf, (UV)flags); + /* compilation errors can zero PL_compcv */ + if (!PL_compcv) + return NOT_IN_PAD; + offset = pad_findlex(namepv, namelen, flags, PL_compcv, PL_cop_seqmax, 1, NULL, &out_pn, &out_flags); if ((PADOFFSET)offset != NOT_IN_PAD) |