This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: unbelievably filesize
w.peppmeyer@wohnfinder.de wrote:
>hi,
>
>at a win2k box ls and du are showing the following
>
>$ ls -l fileserver_voll.bkf
>-rw-r--r-- 1 w.peppme Entwickl 18446744072396582912 Sep 20 14:14 fileserver_v
>oll.bkf
>$ du -b fileserver_voll.bkf
>2981998592 fileserver_voll.bkf
>
>the real filesize is 7.276.965.888 bytes and 5.983.522.816 bytes on disk
>with ntfs compression enabled. the file is mounted from another
>win2k box.
>
>have a nice day
>
obviously some sort of overflow ... i've determined how you get this
number 18446744072396582912 ...
18446744072396582912 = 0xffffffff00000000 | (7276965888 & 0xffffffff )
it is probably the result of trying to sign extend a already overflowed
32-bit integer. somewhere along the line, the file size is casted to a
32-bit signed integer, and then recasted to a 64-bit signed integer.
don't bother launching the debugger.
liulk
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/