This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c:newPADOP: Allocate GV pad slots like constants
authorFather Chrysostomos <sprout@cpan.org>
Wed, 27 Aug 2014 02:42:26 +0000 (19:42 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 28 Aug 2014 20:04:17 +0000 (13:04 -0700)
commitc2bad63bb3d0040e5c527f89f5ed744882e53734
tree0b22f1614cff689b8f4b87512c5efed416ad4bba
parentff06c6b2c730b4a60411e54a4a0008d0e547101a
op.c:newPADOP: Allocate GV pad slots like constants

Requesting a pad slot for a constant (and GVs in pads are like con-
stants, in that the pad slot will always hold that same value, which
is shared in recursion) will instruct pad_alloc to avoid anything
marked PADTMP; i.e., a  slot used as a target by a previous statement.

Without this, under -Accflags=-DUSE_BROKEN_PAD_RESET and threads,
configpm fails an assertion, because a concat operator tries to do
sv_grow on its target, but that target has ended up becoming a GV.

With this commit, all tests pass, but t/re/uniprops.t takes â€˜forever’
(cf. commits 325e1816 and 7db6405c, which caused and fixed, respec-
tively, a similar bug).
op.c