Skip to content

Conversation

@zhassan-aws
Copy link
Contributor

As pointed out in #3498, validity checks for pointer to reference casts (added in #3221) were not instrumented in the case of fat pointers (e.g. array and string slices). This PR extends the instrumentation of validity checks to handle those cases.

Resolves #3498

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 September 11, 2024 23:07
@github-actions github-actions bot added the Z-EndToEndBenchCI Tag a PR to run benchmark CI label Sep 11, 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.

I pushed a fix for the test, but as I mentioned before. I think we could create a new test from the existing one that shows the new code catch those issues.

BTW, I think the code we added still does not check alignment.

@zhassan-aws
Copy link
Contributor Author

I think we could create a new test from the existing one that shows the new code catch those issues.

Added as an expected test.

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!

@zhassan-aws zhassan-aws added this pull request to the merge queue Sep 18, 2024
Merged via the queue into model-checking:main with commit f888913 Sep 18, 2024
27 checks passed
@zhassan-aws zhassan-aws deleted the iss-3498 branch September 18, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kani does not detect UB when generating an invalid slice reference from an invalid slice pointer

2 participants