summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-06-29 12:41:21 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-06-29 22:20:12 -0700
commit4a273b91c8e47ab37c6dd310072403d4fe2d0fb9 (patch)
treed6a0d09ab56dcddf2bb5ffee0858f5dfb7820653 /perly.y
parent61984ee1c56aaa8a989b7eed4cbc2effd74177c5 (diff)
downloadperl-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.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/perly.y b/perly.y
index e103db4350..c819b5b52f 100644
--- a/perly.y
+++ b/perly.y
@@ -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);
}