diff options
author | Sergey Aleynikov <sergey.aleynikov@gmail.com> | 2018-04-19 03:44:46 +0300 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-04-19 11:30:43 -0600 |
commit | 202cd98a669eb31ef52b1f7443dbff2683933480 (patch) | |
tree | 6cc2b4695b2566562e406ee27da9b993ed62dc80 /ext/XS-APItest | |
parent | bf634d4e041c3abb5408cd1f18f1c18d298012d1 (diff) | |
download | perl-202cd98a669eb31ef52b1f7443dbff2683933480.tar.gz |
PATCH: [perl #133121] Fix crash in gv_fetchmeth_sv
S_gv_fetchmeth_internal supports its arguments being either an SV or
a (name, len) pair. But when performing an ISA traversal to get method from
a parent class, it accounted only for the latter.
Diffstat (limited to 'ext/XS-APItest')
-rw-r--r-- | ext/XS-APItest/t/gv_fetchmeth.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/XS-APItest/t/gv_fetchmeth.t b/ext/XS-APItest/t/gv_fetchmeth.t index 22e8b142b3..9ba1650e8f 100644 --- a/ext/XS-APItest/t/gv_fetchmeth.t +++ b/ext/XS-APItest/t/gv_fetchmeth.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 43; +use Test::More tests => 44; use_ok('XS::APItest'); @@ -70,3 +70,10 @@ ok !XS::APItest::gv_fetchmeth_type(\%::, "method\0not quite!", 3, $level, 0), "g } } } + +{ + @Foo::ISA = qw/Bar/; + @Bar::ISA = qw//; + + is(XS::APItest::gv_fetchmeth_type(\%Foo::, "nomethod", 1, -1, 0), undef, 'gv_fetchmeth_sv survives @ISA traversal'); +} |