Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 5f5946e91cdf0dec287e96e997baa0a1 > files > 5

perl-5.12.3-4.2.mga1.src.rpm

--- sv.c	2010-09-07 01:30:32.000000000 +0200
+++ sv.c.oden	2010-11-19 13:39:47.304105037 +0100
@@ -5674,6 +5674,17 @@ Perl_sv_clear(pTHX_ register SV *const s
     assert(SvREFCNT(sv) == 0);
     assert(SvTYPE(sv) != SVTYPEMASK);
 
+    if (type == SVTYPEMASK) {
+	/* in some bad cases, scalar is freed a second time,
+	   resulting in a segfault (mdvbz#34505) in mg_free(sv) below.
+
+	   perl HEAD has an assert (http://public.activestate.com/cgi-bin/perlbrowse/p/32788),
+	   but since we can't reproduce and it's seems hard to fix those cases,
+	   (as http://rt.perl.org/rt3/Public/Bug/Display.html?id=50142 seems to say ??)
+	   we need to workaround... */
+	return;
+    }
+
     if (type <= SVt_IV) {
 	/* See the comment in sv.h about the collusion between this early
 	   return and the overloading of the NULL and IV slots in the size