summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorilmari@vesla.ilmari.org <ilmari@vesla.ilmari.org>2008-02-21 12:29:42 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-02-25 10:54:47 +0000
commit5fa9f95182cd3e9dfed1f750408ef8b876d6a9c6 (patch)
tree1961dd4cd8e5949748a8b20f7e77cd4639474bcc /mro.c
parent0a3a8dc0cd7227e83cd26fe236d1ad57c4add668 (diff)
downloadperl-5fa9f95182cd3e9dfed1f750408ef8b876d6a9c6.tar.gz
Avoid a segfault case in MRO code, based on :
Subject: [perl #51092] [PATCH] Segfault when calling ->next::method on non-existing package From: ilmari@vesla.ilmari.org (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-15287-1203654581-377.51092-75-0@perl.org> p4raw-id: //depot/perl@33367
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mro.c b/mro.c
index 83872dc50a..2d52805826 100644
--- a/mro.c
+++ b/mro.c
@@ -954,7 +954,7 @@ XS(XS_mro_nextcan)
if(sv_isobject(self))
selfstash = SvSTASH(SvRV(self));
else
- selfstash = gv_stashsv(self, 0);
+ selfstash = gv_stashsv(self, GV_ADD);
assert(selfstash);