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 ICEs due to mismatched arguments #2994

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

celinval
Copy link
Contributor

@celinval celinval commented Feb 6, 2024

Use FnAbi instead of function signature when generating code for function types. Properly check the PassMode::Ignore. For foreign functions, instead of ignoring the declaration type, cast the arguments and return value.

For now, we also ignore the caller location, since we don't currently support tracking caller location. This change makes it easier for us to do so. We might want to wait for this issue to get fixed so we can easily add support using stable APIs: rust-lang/project-stable-mir#62

Resolves #2260
Resolves #2312
Resolves #1365
Resolves #1350

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

Use FnAbi instead of function signature when generating code for
function types. Properly check the `PassMode::Ignore`.
For foreign functions, instead of ignoring the declaration type, cast
the arguments and return value.

For now, we also ignore the caller location, since we don't currently
support tracking caller location. This change makes it easier for us to
do so. We might want to wait for this issue to get fixed so we can
easily add support using stable APIs:

rust-lang/project-stable-mir#62
@celinval celinval requested a review from a team as a code owner February 6, 2024 01:11
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Feb 6, 2024
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

@celinval celinval enabled auto-merge (squash) February 6, 2024 19:03
@celinval celinval merged commit a82bad4 into model-checking:main Feb 6, 2024
19 of 20 checks passed
feliperodri added a commit that referenced this pull request Feb 9, 2024
## What's Changed
* `modifies` Clauses for Function Contracts by @JustusAdam in
#2800
* Fix ICEs due to mismatched arguments by @celinval in
#2994. Resolves the following
issues:
  * #2260
  * #2312
* Enable powf*, exp*, log* intrinsics by @tautschnig in
#2996
* Upgrade Rust toolchain to nightly-2024-01-24 by @celinval @feliperodri
@qinheping

**Full Changelog**:
kani-0.45.0...kani-0.46.0

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

---------

Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
Co-authored-by: Celina G. Val <celinval@amazon.com>
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
2 participants