This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In S_fold_constants() under MAD, need to copy the SV representing the result.
authorNicholas Clark <nick@ccl4.org>
Mon, 11 Apr 2011 19:25:04 +0000 (20:25 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 19 May 2011 07:55:56 +0000 (08:55 +0100)
commit523a0f0c39e20d3c9a00a9efa8a965d0cf7ed035
treecbc254864a93286b62f144eb9d6f7748c6982941
parent8ae73bce341cb300ba81a3680bab34352ff2c2ba
In S_fold_constants() under MAD, need to copy the SV representing the result.

For the non-MAD case (the historical default), it was fine to use pad_swipe()
(which doesn't adjust any part of the OS), because the OS was freed soon after.
However, the MAD code doesn't free the OS, hence as-was, without this change,
the OS still thought that it owned the pad slot, and much jollity resulted as
two different parts of the code fought over whichever SV had the bad luck to
next be billeted there.
op.c