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

Field sensitivity: also rewrite byte extract to type casts #7739

Merged
merged 1 commit into from
May 31, 2023

Conversation

tautschnig
Copy link
Collaborator

With model-checking/kani#2456 we see examples where a pointer of a different type is byte-extracted from a union. This is caused by Rust's niche placement. get_subexpression_at_offset already catered for that, but we didn't use it in field expansion.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: -0.10 ⚠️

Comparison is base (453eb65) 78.55% compared to head (003b7c7) 78.45%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7739      +/-   ##
===========================================
- Coverage    78.55%   78.45%   -0.10%     
===========================================
  Files         1691     1691              
  Lines       193125   193132       +7     
===========================================
- Hits        151712   151528     -184     
- Misses       41413    41604     +191     
Impacted Files Coverage Δ
src/goto-symex/field_sensitivity.cpp 92.69% <57.14%> (-0.59%) ⬇️

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to have a test for this.

@tautschnig tautschnig force-pushed the feature/fs-typecast branch from a939baf to 9e07a87 Compare May 31, 2023 11:21
@tautschnig
Copy link
Collaborator Author

It would be great to have a test for this.

Done.

--
^\(\d+\) guard#\d+ == .*byte_extract
--
Confirms that field sensitivity can resolve pointer byte extracts to type cats.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐈s -> casts

With model-checking/kani#2456 we see examples
where a pointer of a different type is byte-extracted from a union. This
is caused by Rust's niche placement. `get_subexpression_at_offset`
already catered for that, but we didn't use it in field expansion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-high Kani Bugs or features of importance to Kani Rust Verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants