You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2015/09/08 12:56:41 UTC

svnfsfs stats division by zero on empty repository

$ svnadmin create repo
$ svnfsfs stats repo
...
Extensions by number of representations:
Floating point exception

Program received signal SIGFPE, Arithmetic exception.
0x000000000040311c in print_extensions_by_changes (stats=0x61bf10, 
    pool=0x60c450) at ../src/subversion/svnfsfs/stats-cmd.c:249
249	         (int)((stats->file_histogram.total.count - sum) * 100 /
(gdb) l
244	    }
245	
246	  printf(_("%11s %20s (%2d%%) representations\n"),
247	         "(others)",
248	         svn__ui64toa_sep(stats->file_histogram.total.count - sum, ',', pool),
249	         (int)((stats->file_histogram.total.count - sum) * 100 /
250	               stats->file_histogram.total.count));
251	}
252	
253	/* Print the (up to) 16 extensions in STATS with the largest total size of
(gdb) p stats->file_histogram.total.count
$1 = 0

-- 
Philip Martin
WANdisco

Re: svnfsfs stats division by zero on empty repository

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Tue, Sep 8, 2015 at 12:56 PM, Philip Martin <ph...@wandisco.com>
wrote:

> $ svnadmin create repo
> $ svnfsfs stats repo
> ...
> Extensions by number of representations:
> Floating point exception
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x000000000040311c in print_extensions_by_changes (stats=0x61bf10,
>     pool=0x60c450) at ../src/subversion/svnfsfs/stats-cmd.c:249
> 249              (int)((stats->file_histogram.total.count - sum) * 100 /
> (gdb) l
> 244         }
> 245
> 246       printf(_("%11s %20s (%2d%%) representations\n"),
> 247              "(others)",
> 248              svn__ui64toa_sep(stats->file_histogram.total.count - sum,
> ',', pool),
> 249              (int)((stats->file_histogram.total.count - sum) * 100 /
> 250                    stats->file_histogram.total.count));
> 251     }
> 252
> 253     /* Print the (up to) 16 extensions in STATS with the largest total
> size of
> (gdb) p stats->file_histogram.total.count
> $1 = 0
>

Thanks for the report, Philip. Fixed in r1702310.

-- Stefan^2.