[perl.git] branch blead, updated. v5.25.4-111-g92b69f6

2016-09-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit 92b69f6501b4d7351e09c8b1ddd386aa7e1c9cd1
Author: Father Chrysostomos 
Date:   Sun Sep 11 21:29:56 2016 -0700

[perl #129164] Crash with splice

This fixes #129166 and #129167 as well.

splice needs to take into account that arrays can hold NULLs and
return _sv_undef in those cases where it would have returned a
NULL element.
---

Summary of changes:
 pp.c |  4 
 t/op/array.t | 17 +
 2 files changed, 21 insertions(+)

diff --git a/pp.c b/pp.c
index 49b6abe..ea49b01 100644
--- a/pp.c
+++ b/pp.c
@@ -5363,6 +5363,8 @@ PP(pp_splice)
for (i = length - 1, dst = (ary)[offset]; i > 0; i--)
SvREFCNT_dec(*dst++);   /* free them now */
}
+   if (!*MARK)
+   *MARK = _sv_undef;
}
AvFILLp(ary) += diff;
 
@@ -5459,6 +5461,8 @@ PP(pp_splice)
while (length-- > 0)
SvREFCNT_dec(tmparyval[length]);
}
+   if (!*MARK)
+   *MARK = _sv_undef;
}
else
*MARK = _sv_undef;
diff --git a/t/op/array.t b/t/op/array.t
index 691d6ce..59ba434 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -558,4 +558,21 @@ is $#foo, 3, 'assigning to arylen aliased in 
foreach(scalar $#arylen)';
 sub { undef *_; shift }->(); # This would crash; no ok() necessary.
 sub { undef *_; pop   }->();
 
+# [perl #129164], [perl #129166], [perl #129167]
+# splice() with null array entries
+# These used to crash.
+$#a = -1; $#a++;
+() = 0-splice @a; # subtract
+$#a = -1; $#a++;
+() =  -splice @a; # negate
+$#a = -1; $#a++;
+() = 0+splice @a; # add
+# And with array expansion, too
+$#a = -1; $#a++;
+() = 0-splice @a, 0, 1, 1, 1;
+$#a = -1; $#a++;
+() =  -splice @a, 0, 1, 1, 1;
+$#a = -1; $#a++;
+() = 0+splice @a, 0, 1, 1, 1;
+
 "We're included by lib/Tie/Array/std.t so we need to return something true";

--
Perl5 Master Repository


[perl.git] branch smoke-me/jkeenan/126599-preload, created. v5.25.4-111-gd146d74

2016-09-11 Thread James Keenan
In perl.git, the branch smoke-me/jkeenan/126599-preload has been created



at  d146d745b3d9e0d62d42242dce0a50c882924be3 (commit)

- Log -
commit d146d745b3d9e0d62d42242dce0a50c882924be3
Author: Hanno Böck 
Date:   Sun Sep 11 22:06:47 2016 -0400

Remove wrapper script "preload".

Committer: Add Hanno Böck to AUTHORS.

For RT #126599
---

--
Perl5 Master Repository


[perl.git] branch smoke-me/jkeenan/atoomic/129235-selectsaver, created. v5.25.4-111-g9ebbf5f

2016-09-11 Thread James Keenan
In perl.git, the branch smoke-me/jkeenan/atoomic/129235-selectsaver has been 
created



at  9ebbf5fb64d4cde810cb2af040ce328e5cf5b8b6 (commit)

- Log -
commit 9ebbf5fb64d4cde810cb2af040ce328e5cf5b8b6
Author: Nicolas R 
Date:   Thu Sep 8 14:29:46 2016 -0600

Reduce SelectSaver memory footprint

This is saving about 500k when using SelectSaver
as most of the time Carp is not required.

before> perl -I. -e 'require q{lib/SelectSaver.pm}; print qx{grep VmRSS 
/proc/$$/status}'
VmRSS:  2920 kB

after> perl -I. -e 'require q{lib/SelectSaver.pm}; print qx{grep VmRSS 
/proc/$$/status}'
VmRSS:  2352 kB

Committer: Bump SelectSaver $VERSION.

For: RT #129235.
---

--
Perl5 Master Repository