Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix infinite loop during global destruction.

Sometimes (and I could never repeat this locally) use_file() could be called
during global destruction.  If $find_filename had been destroyed by then
use_file() would go into an infinite loop.  The simple test for this is
whether $find_filename is false.
  • Loading branch information...
commit 52456192bcb33867e7d6d799c3986b5cd5761d46 1 parent 6de4256
@pjcj authored
Showing with 4 additions and 0 deletions.
  1. +1 −0  Changes
  2. +3 −0  lib/Devel/Cover.pm
View
1  Changes
@@ -4,6 +4,7 @@ Devel::Cover history
- JSON:PP should have been JSON::PP (Paul Hirst) (github 28).
- Correct when some new tests should be skipped.
- Quieten some debugging output.
+ - Fix infinite loop during global destruction (github 29).
Release 0.95 - 22 September 2012
- Fix loss of condition coverage data when first operand calls into ignored
View
3  lib/Devel/Cover.pm
@@ -559,6 +559,9 @@ my $find_filename = qr/
sub use_file
{
+ # If we're in global destruction, forget it.
+ return unless $find_filename;
+
my ($file) = @_;
# print STDERR "use_file($file)\n";
Please sign in to comment.
Something went wrong with that request. Please try again.