Skip Menu |

This queue is for tickets about the App-perlmv CPAN distribution.

Report information
The Basics
Id: 108952
Status: resolved
Priority: 0/
Queue: App-perlmv

People
Owner: Nobody in particular
Requestors: vlasenko [...] imath.kiev.ua
Cc:
AdminCc:

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



Subject: infinite loop
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-compile.t ........................... ok Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.48/blib/lib/App/perlmv.pm line 451. Use of uninitialized value $anew in hash element at /usr/src/RPM/BUILD/App-perlmv-0.48/blib/lib/App/perlmv.pm line 460. Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.48/blib/lib/App/perlmv.pm line 451. Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.48/blib/lib/App/perlmv.pm line 451. [...] --- App-perlmv-0.48/lib/App/perlmv.pm 2015-01-07 08:39:29.000000000 +0000 +++ App-perlmv-0.48/lib/App/perlmv.pm 2015-11-14 21:55:54.814803550 +0000 @@ -448,7 +448,7 @@ unless ($self->{'overwrite'}) { my $i = 1; while (1) { - if ((-e $new) || exists $self->{_exists}{$anew}) { + if ((-e $new) || (defined($anew) && exists $self->{_exists}{$anew})) { $new = "$orig_new.$i"; $anew = l_abs_path($new); $i++;
Subject: App-perlmv-0.48-infinite_loop.patch
--- App-perlmv-0.48/lib/App/perlmv.pm 2015-01-07 08:39:29.000000000 +0000 +++ App-perlmv-0.48/lib/App/perlmv.pm 2015-11-14 21:55:54.814803550 +0000 @@ -448,7 +448,7 @@ unless ($self->{'overwrite'}) { my $i = 1; while (1) { - if ((-e $new) || exists $self->{_exists}{$anew}) { + if ((-e $new) || (defined($anew) && exists $self->{_exists}{$anew})) { $new = "$orig_new.$i"; $anew = l_abs_path($new); $i++;
Subject: hsh.log

Message body is not shown because it is too large.

Hm, didn't realize rel2abs() can fail and return undef. I choose to exit early when this happens. Could you test again with 0.49? Thanks.
Втр Ноя 17 06:25:05 2015, PERLANCAR писал: Show quoted text
> Hm, didn't realize rel2abs() can fail and return undef. I choose to > exit early when this happens. Could you test again with 0.49? Thanks.
0.49 (as in git) go into infinite loop the same :( changes should be made in the loop, not before the loop.
On Tue Nov 17 06:45:19 2015, VIY wrote: Show quoted text
> Втр Ноя 17 06:25:05 2015, PERLANCAR писал:
> > Hm, didn't realize rel2abs() can fail and return undef. I choose to > > exit early when this happens. Could you test again with 0.49? Thanks.
> > 0.49 (as in git) go into infinite loop the same :( > changes should be made in the loop, not before the loop.
Ah, so $anew becomes undef not because of rel2abs() before the loop, but because of l_abs_path() inside the loop. Ok, I applied your patch and released 0.50. Please test, thanks.
On Tue Nov 17 07:06:53 2015, PERLANCAR wrote: Show quoted text
> On Tue Nov 17 06:45:19 2015, VIY wrote:
> > Втр Ноя 17 06:25:05 2015, PERLANCAR писал:
> > > Hm, didn't realize rel2abs() can fail and return undef. I choose to > > > exit early when this happens. Could you test again with 0.49? > > > Thanks.
> > > > 0.49 (as in git) go into infinite loop the same :( > > changes should be made in the loop, not before the loop.
> > Ah, so $anew becomes undef not because of rel2abs() before the loop, > but because of l_abs_path() inside the loop. Ok, I applied your patch > and released 0.50. Please test, thanks.
Sincce there is no further reply, I'm assuming the issue has been resolved. Closing ticket for now.