Skip Menu |
 

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

Report information
The Basics
Id: 96596
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: s.schoeling [...] linet-services.de
Cc:
AdminCc:

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



Subject: Incorrect use of apply causes sort to segfault in XS
Date: Fri, 20 Jun 2014 19:25:48 +0200
To: bug-List-MoreUtils [...] rt.cpan.org
From: Sven Schöling <s.schoeling [...] linet-services.de>
Download (untitled) / with headers
text/plain 532b
The following code segfaults: perl -MList::MoreUtils=apply -le '@a = sort apply 1,2' Only the XS version segfaults, the pure perl version works fine. I tested it on the following (sparse) list of versions I have available: 5.12.[24] - works 5.14.2 - works 5.15.5 - segfault 5.16.0 - segfault 5.18.0 - segfault 5.19.11 - segfault Both 0.33 and 0.400_009 are affected. I tried to reproduce it with List::Util::reduce, but can seem to convince sort to use it as a compare function. -- Sven Schöling
Download (untitled) / with headers
text/plain 162b
I added a dedicated check in all functions before calling $code. Seems to be a nasty one - I forwarded it to perl5-perters and wait what comes out of it. Cheers
The LMU part should be solved with 0.400_010


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.