In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/b12396ac84cef7e23e1aac516fa676165ddfc790?hp=57e88091a0a502716610aeeade5461e8e8a2192a>
- Log ----------------------------------------------------------------- commit b12396ac84cef7e23e1aac516fa676165ddfc790 Author: Tony Cook <[email protected]> Date: Tue May 5 16:23:59 2015 +1000 [perl #124187] don't call pad_findlex() on a NULL CV ----------------------------------------------------------------------- Summary of changes: pad.c | 4 ++++ t/base/lex.t | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/pad.c b/pad.c index d8789ab..569f995 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) diff --git a/t/base/lex.t b/t/base/lex.t index 0a07ab7..a34a508 100644 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -506,3 +506,8 @@ eval q|s##[}#e|; eval q|my($_);0=split|; eval q|my $_; @x = split|; } + +{ + # Used to crash [perl #124187] + eval q|qq{@{[{}}*sub{]]}}}=u|; +} -- Perl5 Master Repository
