64-bit stat (or not) in 32-bit Fedora binaries

Miloslav Trmač mitr at volny.cz
Wed Feb 20 12:50:11 UTC 2013


On Mon, Feb 18, 2013 at 10:33 PM, Eric Sandeen <sandeen at redhat.com> wrote:
> XFS recently defaulted to allowing > 32 bit inode numbers, and btrfs can let inode numbers creep past 2^32 as well.
>
> While most applications don't care one bit about st_ino returned from a stat() call, the sad fact is that you'll get EOVERFLOW from stat32 if the inode number is too big to fit in 32 bits, even if you just wanted to get the file size.
>
<snip>
> Anyway, if you want to check your package(s) and maybe make them 64-bit-stat safe, the perl script above might help.  It's more than just -DFILE_OFFSET_BITS=64, since you'll need to be sure not to overflow any large values you get back from stat64 etc.
>
> Might be nice to get out ahead of this before, say, btrfs comes into wide use.  I don't know if there could be any more of a formal effort in this direction?

That would be very useful.

1) Easy: run a script to find affected packages and auto-file bugs.
2) Fairly possible: get at least the important packages fixed in F19
(or, 1+2: change default build configuration to cover most packages,
and rebuild.)

3) Difficult to do right now? set up an automated test to ensure new
packages are also covered and there are no regressions.
    Mirek


More information about the devel mailing list