summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-14 06:20:34 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-14 22:29:45 -0700
commitd2691ae2082d66317df547754a5f551ba3ef3bf0 (patch)
tree72cb6bd4499b7fb130e5dc9a44df21cdf9d4f220 /perly.c
parent40490cca4e530eb6432933baf72ce12db36a4b6c (diff)
downloadperl-d2691ae2082d66317df547754a5f551ba3ef3bf0.tar.gz
Prevent assertion failure with ‘no a a 3’
This particular syntax error, whittled down from ‘no if $] >= 5.17.4 warnings => "deprecated"’ (which contains a type), causes the parser to try to free an op from the new sub (for the BEGIN block) after freeing the new sub. This happens on line 526 of perly.c. It should not be necessary for the parser to free the op at this point, since after an error any ops owned by incomplete subs’ slabs will be freed. I’m leaving the other three instances of op_free in perly.c in place, at least for now, since there are cases where the forced token stack prevents ops from being freed when their subs are.
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/perly.c b/perly.c
index 5fb2d7298d..c83a932977 100644
--- a/perly.c
+++ b/perly.c
@@ -522,8 +522,6 @@ Perl_yyparse (pTHX_ int gramtype)
}
YYDSYMPRINTF ("Error: discarding", yytoken, &parser->yylval);
- if (yy_type_tab[yytoken] == toketype_opval)
- op_free(parser->yylval.opval);
parser->yychar = YYEMPTY;
}