Package: lcov
Version: 1.7-1
Severity: important
Tags: patch

--- Please enter the report below this line. ---

lcov in it's current form doesn't work for some input data.

It complains like this:

genhtml: Can't use an undefined value as a HASH reference at /usr/bin/genhtml 
line 1506.

A patch for this is available in upstream CVS as discussed at [1]. I also 
attached the patch for ease.

Joost

[1] http://old.nabble.com/-Ltp-coverage--Issue-when-doing-a-merge-of-info-
files-with-genhtml-td26166177.html



--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.31-1-amd64

Debian Release: squeeze/sid
  500 unstable        ftp.nl.debian.org 

--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.




--- utils/analysis/lcov/bin/genhtml 1.24 
+++ utils/analysis/lcov/bin/genhtml 1.25 
@@ -1503,7 +1503,9 @@ sub merge_func_data($$$) 
         my %result; 
         my $func; 

-       %result = %{$funcdata1}; 
+       if (defined($funcdata1)) { 
+               %result = %{$funcdata1}; 
+       } 

         foreach $func (keys(%{$funcdata2})) { 
                 my $line1 = $result{$func}; 
@@ -1535,7 +1537,9 @@ sub add_fnccount($$) 
         my $fn_hit; 
         my $function; 

-       %result = %{$fnccount1}; 
+       if (defined($fnccount1)) { 
+               %result = %{$fnccount1}; 
+       } 
         foreach $function (keys(%{$fnccount2})) { 
                 $result{$function} += $fnccount2->{$function}; 
         } 

Reply via email to