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

Owner: Nobody in particular
Requestors: tokuhirom+cpan [...]

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

Subject: &reduce('foo', 1)' cause segv
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 599
Download (untitled) / with headers
text/plain 599b
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);
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-4108-1241488604-1508.37270-0-0 [...]>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 62
this ticket appears to be fixed in git 'next' branch -- rjbs

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to