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

Always copy data from OCaml to rust before using it #6725

Merged
merged 5 commits into from
Nov 18, 2020

Conversation

mrmr1993
Copy link
Member

This PR updates the rust bindings to ensure that we never pass OCaml-managed memory to rust functions. This guarantees that we do not read from OCaml heap memory addresses when objects may have been moved by the OCaml GC.

Performance in the interface is slightly worse due to increased copying, but better that than segfaults.

Checklist:

  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them:

@mrmr1993 mrmr1993 requested a review from a team as a code owner November 16, 2020 22:17
@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Nov 16, 2020
@mergify mergify bot merged commit 69f827e into develop Nov 18, 2020
@mergify mergify bot deleted the feature/remove-caml-vector branch November 18, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants