bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11424: coreutils: split tests hang on /dev/zero on GNU/Hurd


From: Jim Meyering
Subject: bug#11424: coreutils: split tests hang on /dev/zero on GNU/Hurd
Date: Wed, 09 May 2012 13:22:17 +0200

Pádraig Brady wrote:
...
>>>From 0b816e06d0b3d0cc9b7d2f92b095145bfe7c5476 Mon Sep 17 00:00:00 2001
>> From: Paul Eggert <address@hidden>
>> Date: Wed, 9 May 2012 12:07:57 +0200
>> Subject: [PATCH] stat: don't report negative file size as huge positive
>>  number
>>
>> * src/stat.c (print_stat): Use out_int, not out_uint for stat.st_size.
>> * NEWS (Bug fixes): Mention it.
...
>
> For the record, stat(1) has output st_size as unsigned since the
> initial implementation in fileutils-4.1.10.
>
> I noticed that st_size is unsigned for 32 bit linux kernels
> according to /usr/include/asm/stat.h, however my modern 32 kernel
> gives EOVERFLOW for files in the 2-4G range, and thus shouldn't
> put negative numbers in those fields. That used not be the case I think:
> http://lkml.indiana.edu/hypermail/linux/kernel/0004.1/0343.html
> Also other 32 bit environments might overflow here.

Thanks for investigating that.
It is reassuring to know that interpreting it as unsigned
used to be correct, and it's only in not adapting to the 32-bit
kernel ABI change did we let the error sneak in.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]