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

Eric Sandeen sandeen at redhat.com
Tue Feb 19 15:10:50 UTC 2013


On 2/19/13 6:48 AM, Petr Pisar wrote:
> On 2013-02-18, Eric Sandeen <sandeen at redhat.com> wrote:
>>
>> 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.
>>
> Is %configure spec macro the right place to define FILE_OFFSET_BITS?

I don't think so, because then rather than getting an (unpleasant
but predictable) EOVERFLOW from the syscall, you might overflow local
variables and get even more random & unpredictable behavior for large
files or inodes.  Unfortunately, I think it's up to individual app writers
to take care of, in order to do it properly and safely.

-Eric

> Because it breaks struct stat ABI, it should be defined on distrubition
> level. For the same reason I can imagine upstream could be reluctant to
> embed the defintion for everybody.
> 
> -- Petr
> 



More information about the devel mailing list