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

different behavior of ocamlc/ocamlopt #3557

Closed
vicuna opened this issue Aug 22, 2002 · 2 comments
Closed

different behavior of ocamlc/ocamlopt #3557

vicuna opened this issue Aug 22, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 22, 2002

Original bug ID: 1347
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Henri Dubois-Ferriere
Version: 3.04
OS: Linux RH7.2 2.4.7-10
Submission from: tcache-wm01.proxy.aol.com (205.188.199.212)

test.ml:
let a = Array.create 10 1.0
let _ = a.(11)

% ocamlopt test.ml
% ./a.out
Fatal error: exception Invalid_argument("out-of-bound array or string access")
% ocamlc test.ml
% ./a.out
Fatal error: exception Invalid_argument("Array.get")

If this can't be easily fixed then the manual section (11.4) that lists
ocamlc/ocamlopt incompatibilites should also include this.

Thanks for the great work.

henri

@vicuna
Copy link
Author

vicuna commented Oct 29, 2002

Comment author: administrator

% ocamlopt test.ml
% ./a.out
Fatal error: exception Invalid_argument("out-of-bound array or string
access")
% ocamlc test.ml
% ./a.out
Fatal error: exception Invalid_argument("Array.get")

It would be very hard to make the bytecode and native code have
the same behaviour in this case, so I've added an item to the list
of differences in section 11.4 of the manual. The change will appear
in the next release of O'Caml.

Thanks for your bug report,

-- Damien

@vicuna
Copy link
Author

vicuna commented Dec 2, 2002

Comment author: administrator

Documented the issue.

@vicuna vicuna closed this as completed Dec 2, 2002
@vicuna vicuna added the bug label Mar 19, 2019
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

1 participant