This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c:ck_rvconst: Allocate GV pad slots like constants
authorFather Chrysostomos <sprout@cpan.org>
Wed, 27 Aug 2014 01:06:48 +0000 (18:06 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 28 Aug 2014 20:04:16 +0000 (13:04 -0700)
commitc9859fbde1acd1489395f240f10a2a5f5eec48ea
tree07cfb7f61d30690b609a6e82372e8c7c3f236568
parenta90643eb8a8cf8b3622ccf3f307525f3d5c5d0c7
op.c:ck_rvconst: 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, we get an assertion failure from ‘miniperl -MExporter’
under -Accflags=-DUSE_BROKEN_PAD_RESET and threads.

With this commit, we get ‘Modification of a read-only value attempted’
instead, which is some progress. :-)
op.c