OCaml Forge

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:
Closed
Submitted by:
Mark Hayden (markghayden)
Assigned to:
Nobody (None)
Hardware:
Other
Resolution:
Fixed
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

Message
Date: 2016-12-28 11:23
Sender: Xavier Leroy

Camlzip 1.06 should behave better for zip files between 2 and 4 Gb in size.

The camlzip project now resides on Github, http://github.com/xavierleroy/camlzip. Follow-ups to this report should be submitted on Github.

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2016-12-28 11:23xleroy
close_dateNone2016-12-28 11:23xleroy
ResolutionNone2016-12-28 11:23xleroy