INN-2.3.x: old bug in cnfsstat
Russ Allbery
rra at stanford.edu
Mon May 7 16:15:45 UTC 2001
Mirek Luc <mirecki at nask.pl> writes:
> This bug cnfsstat introduced in inn-2.3.
> The original cnfsstat from 2.3:
> pippin: /tmp/c > ./cnfsstat.old -a -c DEFAULT
> Class DEFAULT for groups matching "*"
> Buffer CB4, size: 1.12 GBytes, position: 542 MBytes 10.00 cycles
> ^^
> And patched one:
> pippin: /tmp/c > ./cnfsstat -a -c DEFAULT
> Class DEFAULT for groups matching "*"
> Buffer CB4, size: 1.12 GBytes, position: 542 MBytes 10.47 cycles
> ^^
> The Math::BigInt Perl module used by cnfsstat in 2.3 overloads the `/'
> operator for bigints and replaces it with division of integers.
> The patch below is very simple - it forces Perl's `/'. And it works. :)
This would break if the numbers in question are too large for Perl's
native types, though, wouldn't it? Hurm... or would it... maybe Perl
would just upgrade to a double, which would lose precision but be good
enough for our purposes.
Why is cnfsstat using bigints again, anyway, rather than just floats?
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-bugs
mailing list