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 the computation of the number of bytes of a pointer offset #3584

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

zhassan-aws
Copy link
Contributor

This PR fixes the logic that computes the number of bytes of a pointer offset. The logic was incorrectly using the size of the pointer as opposed to the size of the pointee.

This fixes the soundness issue in #3582 (but not the spurious failures).

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 02:31
@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! Why are we still seeing spurious failures? Is that on the wrapping operations?

@tautschnig
Copy link
Member

Are we perhaps making the same mistake in codegen_offset?

@zhassan-aws
Copy link
Contributor Author

zhassan-aws commented Oct 9, 2024

The usage of the pointer instead of the pointee was causing the soundness issue and spurious failures in the multiplication operation used for computing the number of bytes. Both soundness/spurious issues are fixed by this PR. But the remaining spurious failures are in the addition operation (adding the pointer value to the number of bytes). I'm not clear on their cause yet.

@zhassan-aws zhassan-aws added this pull request to the merge queue Oct 9, 2024
Merged via the queue into model-checking:main with commit c645752 Oct 9, 2024
26 of 27 checks passed
@zhassan-aws zhassan-aws deleted the iss3582 branch October 9, 2024 16:45
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.

3 participants