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

Revert Bytes implementation changes introduced by #95 #123

Open
Tracked by #141
alexandruag opened this issue Nov 17, 2020 · 0 comments
Open
Tracked by #141

Revert Bytes implementation changes introduced by #95 #123

alexandruag opened this issue Nov 17, 2020 · 0 comments

Comments

@alexandruag
Copy link
Collaborator

#95 fixed the problem of torn reads/writes caused by the implementation of read/write_obj essentially leveraging the environment specific memcpy, and the implicit assumption that read/write_obj perform atomic accesses up to a certain size at aligned addresses. Meanwhile, we added the load/store operations to Bytes which provide explicit atomic access semantics. We should document that read/write_obj must not be used when atomicity is required, and revert the related changes from #95.

Here are some next steps we should consider:

  • Explicitly document the semantics of read/write_obj with respect to atomicity.
  • Reach out to folks using vm-memory and/or discuss here about the implications of the transition.
  • Consumers of the crate have to replace read/write_objs that are supposed to be atomic with load/stores. Let's do a 0.3.x (or later) release right before removing anything, to help with the transition.
  • Apply the changes and include them in a 0.4.x (or later).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant