Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlrun crashes calling Unix.access on Windows #4411

Closed
vicuna opened this issue Oct 2, 2007 · 1 comment
Closed

ocamlrun crashes calling Unix.access on Windows #4411

vicuna opened this issue Oct 2, 2007 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 2, 2007

Original bug ID: 4411
Reporter: francesco
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2009-03-31T11:08:19Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 3.10.0
Fixed in version: 3.10.0
Category: ~DO NOT USE (was: OCaml general)

Bug description

Microsoft Windows XP [Versione 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:>ocaml
Objective Caml version 3.10.0

#load "unix.cma";;

Unix.access "" [Unix.X_OK];;

At this point Windows displays a message that the application died.
With other access_permission parameters it works.
Probably for the same reason, I can't open the shell with OCamlBrowser.

@vicuna
Copy link
Author

vicuna commented Oct 9, 2007

Comment author: @xavierleroy

The Windows/CRT version of access() does not implement the X_OK check.
Old versions of the CRT would either return an error or ignore the X_OK bit.
Newer versions do so-called "parameter validation" which, by default, does a "Watson" crash reporting.

Sort-of fixed in 3.10 development branch by treating X_OK as R_OK, i.e. just test that file is readable. It looks like the best effort we can do at this moment. Will document it in manual.

Fix needs testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants