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