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

fix alignment issue for bele tests #342

Merged
merged 2 commits into from Oct 24, 2023
Merged

fix alignment issue for bele tests #342

merged 2 commits into from Oct 24, 2023

Conversation

lemire
Copy link
Member

@lemire lemire commented Oct 23, 2023

The test is poorly written and on some system, it may lead to unaligned access when running the tests (armv7). Thanks to @clausecker for proposing a fix.

Fixes #341

@clausecker
Copy link
Collaborator

LGTM, though you should be able to just do

const char32_t utf32 = { 0x40, 0xa7, 0x2208, 0x01d4aa };

which should do the right thing on both byte orders. For UTF-16, there's probably a similar approach, but I'm not exactly sure what it would be.

@lemire
Copy link
Member Author

lemire commented Oct 23, 2023

@clausecker Thanks. I think that this testing code should be redone in a cleaner fashion.

Let me issue a release now.

@lemire lemire merged commit fe9ac10 into master Oct 24, 2023
63 checks passed
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.

Fix bele tests on armv7
2 participants