OCaml Forge
SCM

Detail: [#1390] Check libarchive and ocaml-libarchive agree on the value of _FILE_OFFSET_BITS

Bugs: Browse | Download .csv | Monitor

[#1390] Check libarchive and ocaml-libarchive agree on the value of _FILE_OFFSET_BITS

Date:
2014-05-10 17:00
Priority:
3
State:
Open
Submitted by:
Adrien Nader (camarade_tux)
Assigned to:
Nobody (None)
Hardware:
None
Resolution:
None
Severity:
normal
Version:
None
Component:
None
Operating System:
All
Product:
None
 
URL:
Summary:
Check libarchive and ocaml-libarchive agree on the value of _FILE_OFFSET_BITS

Detailed description
I recently spent some time debugging what amounted to libarchive being built with _FILE_OFFSET_BITS set to 32 while ocaml-libarchive was built with it set to 64. Result is that ocaml-libarchive read 64 bits from the st_size field of struct stat while it was only 32 bits; i.e. it read from the subsequent field in memory.

It would be good to find a way to check both component use the same value for _FILE_OFFSET_BITS.

Note that in this case it was libarchive which was erroneously built with _FILE_OFFSET_BITS set to 32. This happened when preparing the 1.4-beta1 release of http://win-builds.org and I still haven't found out why. Still, safety net would be nice.

Followup

Message
Date: 2014-05-15 18:54
Sender: Adrien Nader

Oh, I thought _FILE_OFFSET_BITS was the issue.

No. The issue is somewhere else. Sure it would be nice to have that check but it wouldn't have changed anything for my issue.

I was building for Windows and changing _FILE_OFFSET_BITS does not change the width of st_size.

I'm not yet sure what's going on; that stuff is a real mess on Windows.

Attached Files:

Changes:

No Changes Have Been Made to This Item