diff options
author | David Mitchell <davem@iabyn.com> | 2019-04-09 10:33:34 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2019-04-12 15:58:04 +0100 |
commit | ad9115fb3ef3c0d588afd07c1b794e99cef3e1ed (patch) | |
tree | d5f299ad474654a05d85e0311987d20977af15ab /t | |
parent | 78bb3b143c41ff368fdc4a87f7e9bf36b3023ca2 (diff) | |
download | perl-ad9115fb3ef3c0d588afd07c1b794e99cef3e1ed.tar.gz |
Avoid leak/crash calling CORE::foo()
The compile time code in Perl_ck_entersub_args_core() that converts a
subroutine call like mypos(1,2) into a direct call to the built-in
function, e.g. pos(1,2), doesn't handle too many args well.
The ops associated with the extra args are excised from the op tree,
but aren't freed, and their op_sigparent pointers aren't updated
correctly.
This is noticeable if op_free() is altered to walk the tree using
op_sigparent to walk back up to the parent.
This commit frees any extra args and emits the 'Too many arguments' error
immediately, rather than tripping over later.
Diffstat (limited to 't')
-rw-r--r-- | t/op/coresubs.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/op/coresubs.t b/t/op/coresubs.t index 62210b576d..2ee63ef5fc 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -37,7 +37,7 @@ my %args_for = ( splice =>)[0,1,2,1,3,1,4,1,5,1], ); my %desc = ( - pos => 'match position', + #pos => 'match position', ); use File::Spec::Functions; |