This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c:pad_free: Don’t turn off the PADTMP flag
authorFather Chrysostomos <sprout@cpan.org>
Wed, 27 Aug 2014 02:05:32 +0000 (19:05 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 28 Aug 2014 20:04:16 +0000 (13:04 -0700)
commitff06c6b2c730b4a60411e54a4a0008d0e547101a
tree212fe3ca5e92ba7b92bd032d562285cae7646f84
parentc9859fbde1acd1489395f240f10a2a5f5eec48ea
pad.c:pad_free: Don’t turn off the PADTMP flag

When we mark a pad entry as being free, it may happen (under
USE_BROKEN_PAD_RESET) that multiple operators from different state-
ments are using the same pad entry for their targets.  If we turn off
the PADTMP flag, the slot may be reused for a constant.  Then an oper-
ator that tries to return a value by assigning to its target will try
to modify a read-only scalar.

Now that (as of a few commits ago) allocation of targets (in
pad_alloc) will reuse entries marked PADTMP, turning off the flag is
not necessary to make a slot available.

This gets the build for USE_BROKEN_PAD_RESET+threads a little further.
The Exporter test now passes, but configpm trips an assertion....
pad.c