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
compatibility between bytecode and native compilation #8041
Comments
Comment author: administrator
But it is documented that the exception raised for out-of-bounds array access
I cannot reproduce it under Mac OS X. Are you sure you didn't use the -unsafe -- Damien |
Comment author: administrator Hello !
I used the default options, after the default installation of the [maclasim13:Documents/Calculs/OG] jkaspari% ocamlopt test2.ml I also attach the file test2.ml Friendly let a = Array.make 4 4;;
|
Comment author: administrator
I cannot reproduce the crash under Linux either. But it is true that
|
Comment author: administrator
OK, I finally reproduced the crash on Mac OS X. It occurs with ocaml 3.06, -- Damien |
Comment author: administrator fixed at some point between 3.06 and 3.06+24 |
Original bug ID: 1570
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Jérôme Kasparian
Version: ocaml 3.06
OS: MacOS X and Mandrake 8.1
Submission from: maclasim13.univ-lyon1.fr (134.214.98.65)
Hello,
It seems that an undocumented (refering to the ocaml 3.06 manual, pages 164-165)
incompatibility between bytecode and native compilation concerns the trapping of
Invalid_arguments exceptions.
The sample code below runs well under bytecode compilation and generates a bus
error when native compiled with ocamlopt.
This is true on MacOS X as well as on Linux Mandrake 8.1
Hope it helps !
Jérôme Kasparian
(* Sample code *)
let a = Array.make 4 4;;
try a.(-4)
with (Invalid_argument "Array.get") -> 0
;;
(* end of sample code *)
The text was updated successfully, but these errors were encountered: