Opened 7 years ago

Closed 14 months ago

#454 closed defect (outdated)

overflow with ls

Reported by: Mike Taves Owned by: martinl
Priority: major Component: Package
Version: Keywords: pkg-msys


With the 64-bit version of OSGeo4W, I'm seeing overflow with the ls utility while inspecting files larger than 4 GB. For instance, write three files that are near the 4 GB size where this is an issue, e.g. with Python

import os
with open('f1.tmp', 'wb') as f:
    f.write(b'\x00' * (2 ** 32 - 1))
with open('f2.tmp', 'wb') as f:
    f.write(b'\x00' * (2 ** 32))
with open('f3.tmp', 'wb') as f:
    f.write(b'\x00' * (2 ** 32 + 1))

Now with either MSYS or the CMD.EXE-based OSGeo4W Shell (shown):

C:\Temp>dir *.tmp
 Volume in drive C is Windows
 Volume Serial Number is C0A8-5CF4

 Directory of C:\Temp

26/01/2015  02:14 p.m.     4,294,967,295 f1.tmp
26/01/2015  02:13 p.m.     4,294,967,296 f2.tmp
26/01/2015  02:27 p.m.     4,294,967,297 f3.tmp
               3 File(s) 12,884,901,888 bytes
               0 Dir(s)  13,467,774,976 bytes free

C:\Temp>ls -l *.tmp
-rw-r--r-- 1 mtoews Administrators 4294967295 Jan 26 14:14 f1.tmp
-rw-r--r-- 1 mtoews Administrators          0 Jan 26 14:13 f2.tmp
-rw-r--r-- 1 mtoews Administrators          1 Jan 26 14:27 f3.tmp

C:\Temp>where ls

Other tools like wc show the correct number of bytes, so I'm not sure where the issue is exactly or what other tools to check. I haven't checked with the 32-bit version of OSGeo4W either.

Change History (3)

comment:1 by jef, 7 years ago

Keywords: pkg-msys added
Owner: changed from osgeo4w-dev@… to martinl

comment:3 by jef, 14 months ago

Resolution: outdated
Status: newclosed
Note: See TracTickets for help on using tickets.