-
Notifications
You must be signed in to change notification settings - Fork 439
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
Bytes.blit implementation has different semantic in BS (bug) #743
Comments
@mransan curious how did you find the cause? will fix it soon. |
@mransan actually it is quite hard to implement |
note this will only affect caml_blit_bytes (not caml_blit_string) since it is impossible for string and bytes to have memory overlap |
@bobzhang thanks for the quick reply! My little side project heavily rely on I agree that a |
see #744, will make a minor release today |
Bytes.blit should work "correctly even if [src] and [dst] are the same byte sequence, and the source and destination intervals overlap".
The BuckleScript implementation does not respect this semantic and therefore creates a bug in perfectly valid OCaml code.
The example below works well with OCaml while fail with BS:
The text was updated successfully, but these errors were encountered: