-
Notifications
You must be signed in to change notification settings - Fork 87
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
Bug with CCVector of Int32 #454
Comments
Sorry it took me so long to look at this. I think it's a compiler issue, I got a small repro that only requires this from the type 'a t = { mutable vec: 'a array }
let push self x = self.vec <- [|x|]
let[@inline] get self i =
if i >= Array.length self.vec then invalid_arg "ohno";
Array.unsafe_get self.vec i so I think inlining across module must lose some information. Please try the main branch to see if my fix works for you too! |
c-cube
added a commit
that referenced
this issue
Sep 17, 2024
ocaml/ocaml#13448 I opened an upstream bug report btw, thank you @RafaelBocquet :) |
c-cube
added a commit
that referenced
this issue
Nov 18, 2024
this is required to be able to repro #454
c-cube
added a commit
that referenced
this issue
Nov 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code
produces the following output:
when compiled to native code (
ocamlfind ocamlopt -linkpkg -package containers -o main main.ml
).It produces the expected output when compiled to bytecode (
ocamlfind ocamlc -linkpkg -package containers -o main main.ml
).The text was updated successfully, but these errors were encountered: