diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-10 19:25:18 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-10 19:25:18 +0000 |
commit | d7aacf4ee7905e48b1ff143784e4166839441b3c (patch) | |
tree | 96eed8abb73dfcd81ebe8af7910bbb3333214759 /gv.c | |
parent | 03fac5cb704bc37e5aca9a9bab49f484ef9bda72 (diff) | |
download | perl-d7aacf4ee7905e48b1ff143784e4166839441b3c.tar.gz |
Fix bug #21914, 3-arg open + local $fh + strict coredump.
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
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -764,8 +764,10 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) : 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 */ |