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

Remove the overflow checks for wrapping_offset #3589

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

zhassan-aws
Copy link
Contributor

This PR removes the overflow checks done for the arith_offset intrinsic, which is used in implementation of ptr::wrapping_offset. According to the documentation, this operation is always safe:

https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
https://doc.rust-lang.org/std/intrinsics/fn.arith_offset.html

See #3582 (comment) for the context.

Resolves #3582

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@zhassan-aws zhassan-aws requested a review from a team as a code owner October 9, 2024 22:44
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Oct 9, 2024
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Thanks

tests/expected/offset-overflow/main.rs Show resolved Hide resolved
@zhassan-aws zhassan-aws added this pull request to the merge queue Oct 10, 2024
Merged via the queue into model-checking:main with commit b29e74f Oct 10, 2024
27 checks passed
@zhassan-aws zhassan-aws deleted the fix-iss3582 branch October 10, 2024 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spurious failure in pointer offset
2 participants