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 isize overflow check for zst offsets #3897

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

carolynzech
Copy link
Contributor

@carolynzech carolynzech commented Feb 21, 2025

#3755 introduced additional safety checks for the offset intrinsic, including a check for whether count overflows isize. However, such overflow is allowed for ZSTs. This PR changes the model to check for ZSTs before computing the offset to avoid triggering an overflow failure for ZSTs.

I also moved an existing test called offset-overflow into another test, since #3755 changed the failure for that test to be about an out of bounds allocation, not an isize overflow.

Resolves #3896

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

@carolynzech carolynzech requested a review from a team as a code owner February 21, 2025 20:47
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Feb 21, 2025
Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

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

Thanks

@carolynzech carolynzech added this pull request to the merge queue Feb 21, 2025
Merged via the queue into model-checking:main with commit 2e95d8b Feb 21, 2025
28 checks passed
@carolynzech carolynzech deleted the offset-zsts branch February 21, 2025 23:05
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.

offset safety check is overly restrictive for ZSTs
2 participants