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(test): clip shift size to 31 bits on arm #32

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

jvdd
Copy link
Owner

@jvdd jvdd commented Mar 1, 2023

Fixes a bug in test_utils.rs on arm devices in the overflow test.

Left shift value should be clipped at 31 to avoid overflow when performing left-shift on arm - as usize on arm is 32-bits.
Note that this case actually never occurs (as we pass 1 << 25 when dealing with f32 values, but the clipping is necessary to compile the .unwrap_or)

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 1, 2023

CodSpeed Performance Report

Merging #32 arm_left_shift_overflow (8099c48) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 52 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@jvdd jvdd merged commit 2732505 into main Mar 1, 2023
@jvdd jvdd deleted the arm_left_shift_overflow branch March 2, 2023 16:04
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

1 participant