diff options
author | David Mitchell <davem@iabyn.com> | 2023-01-11 23:55:23 +0000 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-28 20:53:51 +0800 |
commit | 2d08227e773ded77863cb5e92f5ef5862ffd287f (patch) | |
tree | ca29f79e59027c110713d05cef3016a2598ef8e2 /lib | |
parent | fecade69c526caa9c157a2405486b9089047fc72 (diff) | |
download | perl-2d08227e773ded77863cb5e92f5ef5862ffd287f.tar.gz |
XS::APItest::test_EXTEND(): fixups
This XS function is for testing the stack-extending EXTEND() macro.
This commit fixes two issues.
1) it uses a nested 'sp' variable declaration in addition to the one
declared implicitly, which is confusing. Use a separate variable called
new_sp instead. This changes the logic slightly, since the EXTEND()
macro messes implicitly with sp, including updating it after a realloc.
We have to do that manually now with new_sp.
2) The test function NULLs a couple of items near the top of the
(potentially just extended) stack. Where the extend size is zero, it
could be NULLing out one or two of the passed arguments on the stack.
At the moment these values aren't used any more and are discarded on
return; but it will get messy once the stack becomes reference-counted,
so only NULL addresses if they're above PL_stack_sp.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions