diff options
author | Father Chrysostomos <sprout@cpan.org> | 2018-02-13 13:36:22 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2018-02-18 16:25:42 -0800 |
commit | 7406cffe8ec122fcc2500115f8ed1742385893e1 (patch) | |
tree | 85cd52b856bf70d6a188cf3d1c166c38f15b5138 /README.cygwin | |
parent | c46431c409d5cdb3c1c17c039a19e0e03356c7a6 (diff) | |
download | perl-7406cffe8ec122fcc2500115f8ed1742385893e1.tar.gz |
Fix two bugs when calling &xsub when @_ has holes
This fixes #132729 in the particular instance where an XSUB is
called via ampersand syntax when @_ has ‘holes’, or nonexistent ele-
ments, as in:
@_ = ();
$_[1] = 1;
&xsub;
This means that if the XSUB or something it calls unshifts @_, the
first argument passed to the XSUB will now refer to $_[1], not $_[0];
i.e., as of this commit it is correctly shifted over. Previously, a
‘defelem’ was used, which is a magical scalar that remembers its index
in the array, independent of whether the array was shifted.
In addition, the old code failed to mortalize the defelem, so this
commit fixes a memory leak with the new ‘non-elem’ mechanism (a spe-
cially-marked element stored in the array itself).
Diffstat (limited to 'README.cygwin')
0 files changed, 0 insertions, 0 deletions