Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 26504130ddf299539aa5f8afff3fc15f > files > 17

perl-5.20.1-8.mga5.src.rpm

From d385684951d4e1197c32ad0f4371c5255766a34d Mon Sep 17 00:00:00 2001
From: Father Chrysostomos <sprout@cpan.org>
Date: Tue, 21 Oct 2014 20:25:34 -0700
Subject: [PATCH] =?utf8?q?[perl=20#123029]=20Don=E2=80=99t=20steal=20PADST?=
 =?utf8?q?ALE=20buffers?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

9ffd39ab was supposed to steal buffers only from PADTMP SVs,
but PADTMP and PADSTALE share the same bit, PADMY mediating
between the two meanings.  So we need to check the PADMY flag
as well.
---
 sv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sv.c b/sv.c
index e12c1a5..a4773f7 100644
--- a/sv.c
+++ b/sv.c
@@ -4413,7 +4413,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, SV* sstr, const I32 flags)
 				/* slated for free anyway (and not COW)? */
                     (sflags & (SVs_TEMP|SVf_IsCOW)) == SVs_TEMP
                                 /* or a swipable TARG */
-                 || ((sflags & (SVs_PADTMP|SVf_READONLY|SVf_IsCOW))
+                 || ((sflags & (SVs_PADTMP|SVs_PADMY|SVf_READONLY
+                               |SVf_IsCOW))
                        == SVs_PADTMP
                                 /* whose buffer is worth stealing */
                      && CHECK_COWBUF_THRESHOLD(cur,len)
-- 
2.2.1-313-gcc831f2