Skip Menu |
 

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

Report information
The Basics
Id: 66715
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: stuart [...] morungos.com
Cc:
AdminCc:

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



Subject: SEGV from List::Util::first
Download (untitled) / with headers
text/plain 340b
I just got a SEGV from List::Util::first. Replicated by the following script: use List::Util qw(first); my @patterns = ( [qr{(?i)(.*)\.htm$}, q{$1.\'.html\'}] ); my $file = "test.htm"; List::Util::first { $file =~ s{$_->[0]}{$_->[1]}eeg && $file; } @patterns; Found in Perl 5.10.1 on Win32, built using MinGW. Running on Windows 7.
Download (untitled) / with headers
text/plain 142b
It looks like this was due to something changing in 5.10.1 as I can reproduce it on Linux with 5.10.1 the segv does not happen with 5.10.0
Reproducable against 5.10.1 and 5.12.4. Not reproducable against 5.14.2. -- Paul Evans
Download (untitled) / with headers
text/plain 234b
Crashes: List::Util::first { $file =~ s{$_->[0]}{$_->[1]}ee; 0 } @patterns; Doesn't crash: List::Util::first { $file =~ s{$_->[0]}{$_->[1]}e; 0 } @patterns; Possibly a bad interaction between MULTICALL and /ee ? -- Paul Evans
Download (untitled) / with headers
text/plain 692b
On Fri Mar 30 14:47:09 2012, PEVANS wrote: Show quoted text
> Crashes: > List::Util::first { $file =~ s{$_->[0]}{$_->[1]}ee; 0 } @patterns; > > Doesn't crash: > List::Util::first { $file =~ s{$_->[0]}{$_->[1]}e; 0 } @patterns; > > Possibly a bad interaction between MULTICALL and /ee ?
Results with perl-5.30.0 from attached file: ##### $ perl rtc-66715-list-utils.pl Use of uninitialized value in substitution iterator at rtc-66715-list-utils.pl line 14. Can't find string terminator "'" anywhere before EOF at (eval 2) line 1. ##### Commenting out the first attempt and uncommenting the second gives: ##### $ perl rtc-66715-list-utils.pl file: $1.\'.html\' ##### Thank you very much. Jim Keenan
Subject: rtc-66715-list-utils.pl
use strict; use warnings; use List::Util qw(first); my @patterns = ( [qr{(?i)(.*)\.htm$}, q{$1.\'.html\'}] ); my $file = "test.htm"; #List::Util::first { $file =~ s{$_->[0]}{$_->[1]}eeg && $file; } @patterns; #List::Util::first { $file =~ s{$_->[0]}{$_->[1]}ee; 0 } @patterns; #die $@ if $@; #print "file: $file\n"; $file = "test.htm"; List::Util::first { $file =~ s{$_->[0]}{$_->[1]}e; 0 } @patterns; die $@ if $@; print "file: $file\n";


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.