diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-29 12:41:21 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-29 22:20:12 -0700 |
commit | 4a273b91c8e47ab37c6dd310072403d4fe2d0fb9 (patch) | |
tree | d6a0d09ab56dcddf2bb5ffee0858f5dfb7820653 /perly.act | |
parent | 61984ee1c56aaa8a989b7eed4cbc2effd74177c5 (diff) | |
download | perl-4a273b91c8e47ab37c6dd310072403d4fe2d0fb9.tar.gz |
Don’t crash with formats in special blocks
Commit 421f30ed1e9 didn’t go far enough. If a special block happens
to replace a stub, then a format trying to close over variables in the
special block will be pointing to the wrong outer sub.
Such stubs shouldn’t usually happen, but perl shouldn’t crash.
Diffstat (limited to 'perly.act')
-rw-r--r-- | perly.act | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -214,7 +214,7 @@ case 2: newFORM((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval), (ps[(4) - (4)].val.opval)); (yyval.opval) = (OP*)NULL; #endif - if (CvOUTSIDE(fmtcv) && !CvUNIQUE(CvOUTSIDE(fmtcv))) { + if (CvOUTSIDE(fmtcv) && !CvEVAL(CvOUTSIDE(fmtcv))) { SvREFCNT_inc_simple_void(fmtcv); pad_add_anon(fmtcv, OP_NULL); } @@ -1717,10 +1717,13 @@ case 2: { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; + +/* Line 1267 of yacc.c. */ + default: break; /* Generated from: - * 27cce68ad4844f1b8053bfc11206fb9f559e08be6cefd4a986aaa606c0e5fb38 perly.y + * efdb10e4176c622005697eec1ff496d913ef986c5297086baa5088bbd3aedaf2 perly.y * 38f866dcd8341ad3c0810347587113eb2c6ac7d4f33bdab75b020efce92865be regen_perly.pl * ex: set ro: */ |