[procps] Re: [PATCH] Fix "free -b" on 32-bit machine with lots of swap


----- Mail original -----
> De: "Craig Small" <csmall-procps@xxxxxxxxxx>
> À: procps@xxxxxxxxxxxxx
> Envoyé: Mardi 26 Juin 2012 22:49:54
> Objet: [procps] Re: [PATCH] Fix "free -b" on 32-bit machine with lots of swap
> 
> On Tue, Jun 26, 2012 at 02:18:01PM +0100, Adam Sampson wrote:
> > On my i386 machine with 6G of swap, the "free -b" test fails, because
> > the "swap total" field wraps at 4G -- there's a cast in the wrong place
> > in free.c which means it's doing a "long" multiplication rather than a
> > "long long" one. Patch attached.
> I bet there aren't too many i386 machines with 6G, but in any case yes
> the bug should be fixed.  Thankyou for the patch and it has been applied
> to the git repository.
> 
>  - Craig
> --
That was the exact same issue I reported the 20 may
http://www.freelists.org/post/procps/procps3323-free-b-test-failure-in-SwapTotal

It happen with a machine with a 64 bits kernel, but inside a 32 bits chroot.
I suspect 6GB may be the default swap size on OpenSuse with 64-bits kernel, so 
that could happen more frequently that you would have think.
Anyway, thank for fixing that, I didn't had the time to look at that issue yet.

Gilles

Other related posts: