[Toybox] [BUG] du applet prints wrong output for 2GB+ files

darken darken at darken.eu
Thu Sep 29 11:07:22 PDT 2016


The du applet prints a ridiculously large size if the total size exceeds
2GB.

Reproduced on a Nexus5 with Android 6.0, but I don't think this is Android
specific.
It doesn't matter if it's multiple files or a single one.
Could reproduce it by dd'ing a 2GB file full of zeros.

root at hammerhead:/cache # busybox du -hs /sdcard/2GBTestFile
>
2.5G    /sdcard/2GBTestFile
>
root at hammerhead:/cache # ./toybox-armv6l du -s /sdcard/2GBTestFile
>
18446744073707954404    /sdcard/2GBTestFile
>
root at hammerhead:/cache # ./toybox-armv6l du -hs /sdcard/2GBTestFile
>
16E     /sdcard/2GBTestFile
>

This ticket has more console logs showing the issue.
https://github.com/landley/toybox/issues/51
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160929/b6191f0c/attachment.htm>


More information about the Toybox mailing list