-
Notifications
You must be signed in to change notification settings - Fork 92
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
Limit FFI calls by default to explicitly supported ones #2428
Merged
celinval
merged 9 commits into
model-checking:main
from
celinval:issue-1781-cffi-mismatch
May 5, 2023
Merged
Limit FFI calls by default to explicitly supported ones #2428
celinval
merged 9 commits into
model-checking:main
from
celinval:issue-1781-cffi-mismatch
May 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C-FFI is pretty broken right now. Limit its usage to only support built-in functions that are explicitly included in Kani. User's should still be enable to go back to previous behavior by enabling unstable C-FFI support
celinval
force-pushed
the
issue-1781-cffi-mismatch
branch
from
May 4, 2023 04:44
8eebbc7
to
7646caa
Compare
zhassan-aws
reviewed
May 5, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Mostly minor comments.
kani-compiler/src/codegen_cprover_gotoc/codegen/foreign_function.rs
Outdated
Show resolved
Hide resolved
kani-compiler/src/codegen_cprover_gotoc/codegen/foreign_function.rs
Outdated
Show resolved
Hide resolved
zhassan-aws
reviewed
May 5, 2023
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
feliperodri
reviewed
May 5, 2023
- Add / improve comments - Add expected file - Fix variadic test - improve test
zhassan-aws
approved these changes
May 5, 2023
kani-compiler/src/codegen_cprover_gotoc/codegen/foreign_function.rs
Outdated
Show resolved
Hide resolved
…on.rs Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
C-FFI is fairly unstable right now and the lack of error handling causes a poor experience when things go wrong.
In this PR, we limit its usage to only support CBMC built-in functions that are explicitly included in Kani and alloc functions from
kani_lib.c
. User's should still be enable to go back to previous behavior by enabling unstable C-FFI supportResolved issues:
Resolves #1781
Related RFC:
Call-outs:
This PR is currently blocked by #2427. Once that gets merged, the regression should pass.
Testing:
How is this change tested? New tests
Is this a refactor change? Kinda
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.