You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3324 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
I just noticed that both in_channel_length and LargeFile.in_channel_length
report the wrong values on files that are greater than some number (in my case
2GB) using ocaml 3.08.1 (and 3.08.2) mingw (WindowsXP SP2) build (compiled
following instructions).
In particular I ran the same snippet of code:
let fd_in = open_in_bin "fname";;
in_channel_length fd_in;;
LargeFile.in_channel_length fd_in;;
on the same file in Mac OS X, Gentoo Linux (x86), and mingw.
In the first two cases in_channel_length throws an exception:
Exception: Sys_error "Value too large to be stored in data type".
while LargeFile.in_channel_length returns:
: int64 = 2621440000L
which is correct (doing ls -l in shell).
In the mingw version I get 473956352 for in_channel_length and -1673527296L for
LargeFile.in_channel_length (note the negative value)!
Either I messed up while building from ocaml sources, or this seems to be a
mingw specific bug.
Thanks for any help.
--shiv--
PS: I can send the file if somebody wishes to cross-check.
The text was updated successfully, but these errors were encountered:
Original bug ID: 3324
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Shivkumar Chandrasekaran
Version: 3.08.2
OS: WindowsXP
Submission from: gimli.ece.ucsb.edu (128.111.56.252)
Hi,
I just noticed that both in_channel_length and LargeFile.in_channel_length
report the wrong values on files that are greater than some number (in my case
2GB) using ocaml 3.08.1 (and 3.08.2) mingw (WindowsXP SP2) build (compiled
following instructions).
In particular I ran the same snippet of code:
let fd_in = open_in_bin "fname";;
in_channel_length fd_in;;
LargeFile.in_channel_length fd_in;;
on the same file in Mac OS X, Gentoo Linux (x86), and mingw.
In the first two cases in_channel_length throws an exception:
Exception: Sys_error "Value too large to be stored in data type".
while LargeFile.in_channel_length returns:
which is correct (doing ls -l in shell).
In the mingw version I get 473956352 for in_channel_length and -1673527296L for
LargeFile.in_channel_length (note the negative value)!
Either I messed up while building from ocaml sources, or this seems to be a
mingw specific bug.
Thanks for any help.
--shiv--
PS: I can send the file if somebody wishes to cross-check.
The text was updated successfully, but these errors were encountered: