summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-05-05 16:23:59 +1000
committerTony Cook <tony@develop-help.com>2015-05-05 16:23:59 +1000
commitb12396ac84cef7e23e1aac516fa676165ddfc790 (patch)
tree612a9d3ae16e682941f5a17137d25559b4ddf262 /pad.c
parent57e88091a0a502716610aeeade5461e8e8a2192a (diff)
downloadperl-b12396ac84cef7e23e1aac516fa676165ddfc790.tar.gz
[perl #124187] don't call pad_findlex() on a NULL CV
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pad.c b/pad.c
index d8789abebf..569f9957a0 100644
--- a/pad.c
+++ b/pad.c
@@ -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)