This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix goto-into-string-eval under PERL_UNICODE
authorFather Chrysostomos <sprout@cpan.org>
Fri, 12 Jan 2018 16:37:18 +0000 (08:37 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 12 Jan 2018 16:37:58 +0000 (08:37 -0800)
More precisely, goto-to-jump-into-the-parameter-of-a-string-eval,
which is tested in goto.t as of 6d90e98384, but fails as of that
commit under PERL_UNICODE, because entereval gets a second kid
op (a hintseval op) and ‘looks like’ a list operator, which
6d90e98384 generally forbad.

The easiest way to fix this is simply to add another exception.

pp_ctl.c

index 6e5f34d..4da40e3 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2673,6 +2673,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, U32 flags, OP **opstac
          && OP_CLASS(o) != OA_LOGOP
          && o->op_type != OP_LINESEQ
          && o->op_type != OP_SREFGEN
+         && o->op_type != OP_ENTEREVAL
          && o->op_type != OP_RV2CV) {
        OP * const kid = cUNOPo->op_first;
        if (OP_GIMME(kid, 0) != G_SCALAR || OpHAS_SIBLING(kid))