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

Oops, fix skip_to_escape on BE architectures #1173

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

purplesyringa
Copy link
Contributor

I have belatedly realized that using leading_zeros does not, in fact, work on big-endian machines. I have updated the test to trigger the failure (reproduce with cargo miri test --test test --target powerpc64-unknown-linux-gnu test_control_character_search) and switched to the slower-but-correct from_le_bytes method instead.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

We could add CI coverage for some other architectures, using Miri. There is an example here:

https://github.com/dtolnay/semver/blob/1.0.23/.github/workflows/ci.yml#L103-L110

@dtolnay dtolnay merged commit 8b314a7 into serde-rs:master Aug 11, 2024
13 checks passed
@purplesyringa purplesyringa deleted the fix-big-endian branch August 11, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants