summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-10 19:25:18 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-10 19:25:18 +0000
commitd7aacf4ee7905e48b1ff143784e4166839441b3c (patch)
tree96eed8abb73dfcd81ebe8af7910bbb3333214759 /gv.c
parent03fac5cb704bc37e5aca9a9bab49f484ef9bda72 (diff)
downloadperl-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 0bedea47f7..7d21f02d15 100644
--- a/gv.c
+++ b/gv.c
@@ -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 */