Skip Menu |

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 37270
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: tokuhirom+cpan [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: &reduce('foo', 1)' cause segv
follow code cause segmentation fault. perl -e 'use List::Util qw(reduce); warn &reduce('foo', 1)' List::Util code does not check the return value of sv_2cv. follow is a patch. === Util.xs ================================================================== --- Util.xs (revision 22200) +++ Util.xs (local) @@ -252,6 +252,9 @@ XSRETURN_UNDEF; } cv = sv_2cv(block, &stash, &gv, 0); + if (cv == Nullcv) { + croak("first argument should be coderef"); + } PUSH_MULTICALL(cv); agv = gv_fetchpv("a", TRUE, SVt_PV); bgv = gv_fetchpv("b", TRUE, SVt_PV);
this ticket appears to be fixed in git 'next' branch -- rjbs