OCaml Forge
SCM

Detail: [#1148] fails to open large zip files on 32-bit machines

Bugs: Browse | Download .csv | Monitor

[#1148] fails to open large zip files on 32-bit machines

Date:
2012-05-05 23:19
Priority:
3
State:
Open
Submitted by:
Mark Hayden (markghayden)
Assigned to:
Nobody (None)
Hardware:
Other
Resolution:
None
Severity:
blocker
Version:
None
Component:
None
Operating System:
MacOS X
Product:
None
 
URL:
Summary:
fails to open large zip files on 32-bit machines

Detailed description
This bug was encountered with Camlzip 1.04 compiled/linked with 32-bit Ocaml 3.12 on Mac OS 10.7.

The ultimate target is for an Ocaml app which runs on Apple's IOS 5.0+. IOS of course is also 32 bit.

When opening a 2GB zip file with Zip.open_in, I get the following exception:

Fatal error: exception Sys_error("Value too large to be stored in data type")

I believe, but haven't confirmed, the error is generated by a call to lseek() in io.c to get the size of the file. It appears the other code in ocaml and camlzip may not be able to handle large zip files because of the Ocaml 1GB signed integer limitation on 32-bit systems.

The ZIP file contains a single 2GB file created with dd and /dev/urandom and then compressed with zip.

My goal is to open a large (<2GB) zip file containing thousands of smaller (~1MB) files.

Please let me know if you need any further information.

regards, Mark

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item