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

Consistency of tearing behavior for fields and globals #87

Open
tlively opened this issue Oct 18, 2024 · 1 comment
Open

Consistency of tearing behavior for fields and globals #87

tlively opened this issue Oct 18, 2024 · 1 comment

Comments

@tlively
Copy link
Member

tlively commented Oct 18, 2024

The overview currently notes that accesses to shared globals are not allowed to tear. The rationale behind this decision was that the spec does not currently treat numeric globals as sequences of bytes, so it has no way to describe tearing. Lacking data, we also assumed the performance overhead of preventing tearing on shared globals would be acceptable.

We didn't consider, however, that the same spec problem comes up for accesses to numeric fields of shared structs. It seems unlikely that the overhead of disallowing tears on struct fields will be acceptable, so we might have to start treating them as sequences of bytes after all. We might as well then do the same for globals.

@tlively
Copy link
Member Author

tlively commented Nov 4, 2024

Another consideration here is packed fields, where disallowing tears might have even more overhead on even more platforms.

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