Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006273OCamlOCaml standard librarypublic2013-12-16 17:082014-02-19 17:14
ReporterChristoph Bauer 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Platformx86OSWindowsOS Version7
Product Version4.00.1 
Target VersionFixed in Version 
Summary0006273: Sys.file_exists returns false on large files
DescriptionSys.file_exists returns false, if the file is larger than 4GB.
Steps To Reproduce
# open Sys
# file_exists "c:\\bigfile.dat"
Tagspatch
Attached Filespatch file icon ocaml-file-exists64.patch [^] (851 bytes) 2013-12-18 09:59 [Show Content]

- Relationships

-  Notes
(0010735)
Christoph Bauer (reporter)
2013-12-17 09:39
edited on: 2014-02-21 10:46

Additional info: ocaml was build with MSVC toolchain.

c:\> ocaml unix.cma
Unix.stat "c:\bigfile.dat";;
Exception:
Unix.Unix_error (Unix.EOVERFLOW, "stat", "c:\\bigfile.dat").

Workaround with the unix module:

let file_exists path =
   try ignore (Unix.LargeFile.stat path); true with _ -> false

(0010747)
Christoph Bauer (reporter)
2013-12-18 10:04

The attached patched calls _stati64 (like in win32unix) instead of stat on windows. It solves the problem for me.

- Issue History
Date Modified Username Field Change
2013-12-16 17:08 Christoph Bauer New Issue
2013-12-17 09:39 Christoph Bauer Note Added: 0010735
2013-12-18 09:59 Christoph Bauer File Added: ocaml-file-exists64.patch
2013-12-18 10:04 Christoph Bauer Note Added: 0010747
2014-02-19 17:14 doligez Tag Attached: patch
2014-02-21 10:46 Christoph Bauer Note Edited: 0010735 View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker