[Bug 6908] Problems with bionic libc caused by sizeof(off_t)=4 even with CONFIG_LFS=y

bugzilla at busybox.net bugzilla at busybox.net
Tue Feb 25 12:28:41 UTC 2014


https://bugs.busybox.net/show_bug.cgi?id=6908

Denys Vlasenko <vda.linux at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|tar is broken on Android:   |Problems with bionic libc
                   |resulting stream produces   |caused by sizeof(off_t)=4
                   |damaged files when unpacked |even with CONFIG_LFS=y

--- Comment #9 from Denys Vlasenko <vda.linux at googlemail.com> 2014-02-25 12:28:41 UTC ---
(In reply to comment #8)
> Thank you for your help!
> 
> So 'stat' returns the correct size, but sequential reads hit the end of file? I
> never saw this on unchanged in the process file. This should only happen if
> someone outside truncated the file in the process (which isn't our case).

No, it's bionic fk-up with off_t being 32-bit while other libc's support
transparent redefining it as 64-bit.

In bionic, stat->st_size is not off_t, but rather loff_t (64-bit).

Busybox code so far assumed that if it builds with CONFIG_LFS=y,
then off_t is large integer (so far always 64-bit).

I will use this bug as a tracker for that problem.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list