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 ICE due to mishandling of Aggregate rvalue for raw pointers to trait objects #3636

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

carolynzech
Copy link
Contributor

@carolynzech carolynzech commented Oct 23, 2024

Add a match arm for the AggregateKind::RawPtr(TyKind::RigidTy(RigidTy::Dynamic(..))) case.
Pointers to trait objects are fat, so generate a fat pointer for the rvalue.

Resolves #3631

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

@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Oct 23, 2024
@carolynzech carolynzech changed the title Fix issue 3631 Fix ICE due to mishandling of Aggregate rvalue for raw pointers to dyn Trait Oct 23, 2024
@carolynzech carolynzech changed the title Fix ICE due to mishandling of Aggregate rvalue for raw pointers to dyn Trait Fix ICE due to mishandling of Aggregate rvalue for raw pointers to trait objects Oct 23, 2024
@carolynzech carolynzech marked this pull request as ready for review October 23, 2024 16:48
@carolynzech carolynzech requested a review from a team as a code owner October 23, 2024 16:48
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.

Interesting... I believe the case above the one you added doesn't cover slices. But thanks for fixing that.

tests/expected/issue-3631/issue-3631.expected Outdated Show resolved Hide resolved
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!

tests/expected/issue-3631/issue-3631.expected Outdated Show resolved Hide resolved
tests/expected/issue-3631/issue-3631.rs Outdated Show resolved Hide resolved
tests/expected/issue-3631/issue-3631.rs Outdated Show resolved Hide resolved
@celinval
Copy link
Contributor

I created #3638 to track the issue I just noticed that is unrelated to this PR. Thanks

@carolynzech carolynzech added this pull request to the merge queue Oct 23, 2024
Merged via the queue into model-checking:main with commit 325c9e4 Oct 23, 2024
27 checks passed
@carolynzech carolynzech deleted the issue-3631 branch October 23, 2024 19:37
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.

Unexpected kani panic: assign statement with unequal types
3 participants