From: Peter O. <obe...@us...> - 2013-01-30 11:46:45
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19912 Modified Files: lcov Log Message: lcov: fix bug when converting function data in --diff operation When a patch is applied to a tracefile using command line option --diff and the patch changes the list of functions, the operation aborts with the following error: lcov: Use of freed value in iteration at lcov line 3718. Fix by applying missing calls to keys() when iterating function data hashes. Reported by Nas...@us.... Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** lcov 25 Jan 2013 16:30:25 -0000 1.94 --- lcov 30 Jan 2013 11:46:42 -0000 1.95 *************** *** 3712,3719 **** # Remove count data in testfncdata for functions which are no longer # in funcdata ! foreach $testname (%{$testfncdata}) { my $fnccount = $testfncdata->{$testname}; ! foreach $func (%{$fnccount}) { if (!defined($funcdata->{$func})) { delete($fnccount->{$func}); --- 3712,3719 ---- # Remove count data in testfncdata for functions which are no longer # in funcdata ! foreach $testname (keys(%{$testfncdata})) { my $fnccount = $testfncdata->{$testname}; ! foreach $func (keys(%{$fnccount})) { if (!defined($funcdata->{$func})) { delete($fnccount->{$func}); *************** *** 3723,3727 **** # Remove count data in sumfnccount for functions which are no longer # in funcdata ! foreach $func (%{$sumfnccount}) { if (!defined($funcdata->{$func})) { delete($sumfnccount->{$func}); --- 3723,3727 ---- # Remove count data in sumfnccount for functions which are no longer # in funcdata ! foreach $func (keys(%{$sumfnccount})) { if (!defined($funcdata->{$func})) { delete($sumfnccount->{$func}); |