There used to be a nullstash (%{"<none>::"}) to hold illegal
variables under strict 'vars'. It has been removed by change #17942.
This can lead to segfaults during the parsing, because some illegal
variables might have been discarded before the compilation of the
current statement had completed.
Bug analysis and test case by Enache Adrian.
p4raw-link: @17942 on //depot/perl:
de11ba31bba9f0eef0f76239d1d93a010926d6cf
p4raw-id: //depot/perl@19187
: sv_type == SVt_PVAV ? "@"
: sv_type == SVt_PVHV ? "%"
: ""), name));
+ stash = GvHV(gv_fetchpv("<none>::", GV_ADDMULTI, SVt_PVHV));
}
- return Nullgv;
+ else
+ return Nullgv;
}
if (!SvREFCNT(stash)) /* symbol table under destruction */
EXPECT
Global symbol "@i_like_crackers" requires explicit package name at - line 7.
Execution of - aborted due to compilation errors.
+########
+
+# [perl #21914] New bug > 5.8.0. Used to dump core.
+use strict 'vars';
+@k = <$k>;
+EXPECT
+Global symbol "@k" requires explicit package name at - line 4.
+Global symbol "$k" requires explicit package name at - line 4.
+Execution of - aborted due to compilation errors.