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.y | |
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.y')
-rw-r--r-- | perly.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ barestmt: PLUGSTMT newFORM($2, $3, $4); $$ = (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); } |