-
Notifications
You must be signed in to change notification settings - Fork 106
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
Don't assume primitive alignments #116
Comments
joshlf
added a commit
that referenced
this issue
Nov 3, 2022
Previously, we used the `u16` and `u64` types in a number of tests, relying on them having the alignments 2 and 8 respectively. While those types have those alignments on many platforms, those are not guaranteed to be their alignments on all platforms. In this commit, we replace most of these uses with types of the same size but guaranteed alignment. In a few places, we have to leave the uses as-is, but this isn't a big deal since our tests run in CI on platforms where the alignments are actually the values we're relying upon. Closes #116
joshlf
added a commit
that referenced
this issue
Nov 3, 2022
Previously, we used the `u16` and `u64` types in a number of tests, relying on them having the alignments 2 and 8 respectively. While those types have those alignments on many platforms, those are not guaranteed to be their alignments on all platforms. In this commit, we replace most of these uses with types of the same size but guaranteed alignment. In a few places, we have to leave the uses as-is, but this isn't a big deal since our tests run in CI on platforms where the alignments are actually the values we're relying upon. Closes #116
joshlf
added a commit
that referenced
this issue
Nov 3, 2022
Previously, we used the `u16` and `u64` types in a number of tests, relying on them having the alignments 2 and 8 respectively. While those types have those alignments on many platforms, those are not guaranteed to be their alignments on all platforms. In this commit, we replace most of these uses with types of the same size but guaranteed alignment. In a few places, we have to leave the uses as-is, but this isn't a big deal since our tests run in CI on platforms where the alignments are actually the values we're relying upon. Closes #116
joshlf
added a commit
that referenced
this issue
Aug 3, 2023
Previously, we used the `u16` and `u64` types in a number of tests, relying on them having the alignments 2 and 8 respectively. While those types have those alignments on many platforms, those are not guaranteed to be their alignments on all platforms. In this commit, we replace most of these uses with types of the same size but guaranteed alignment. In a few places, we have to leave the uses as-is, but this isn't a big deal since our tests run in CI on platforms where the alignments are actually the values we're relying upon. Closes #116
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, a lot of our test code assumes that all primitive numerical types have an alignment equal to their size. This isn't true on all platforms, and so we should replace these uses with types with guaranteed alignment.
Credit to @djkoloski for pointing this out in #113 (comment).
The text was updated successfully, but these errors were encountered: