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

I believe this fixes an alignment issue. #62

Merged

Conversation

NovaSmoof
Copy link
Contributor

I believe the second issue referenced in #27 is due to the fact that the bytes array is casted to a uint32_t *, which may cause an alignment issue. So this should force the compiler to align it as if it were a uint32_t array.

Casting the uint8_t array to a uint32_t pointer may cause it to become misaligned. So making it alignas a uint32 array should remove the undefined behavior.
@mariusbancila mariusbancila merged commit c1e1c14 into mariusbancila:master Apr 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants