Skip to content

Byte operator lowering: no type casts to/from compound types - #7420

Merged
tautschnig merged 1 commit into
diffblue:developfrom
tautschnig:bugfixes/7288-byte-byte-extract
Dec 12, 2022
Merged

tautschnig merged 1 commit into
diffblue:developfrom
tautschnig:bugfixes/7288-byte-byte-extract

Conversation

@tautschnig

Copy link
Copy Markdown
Collaborator

We need to create proper struct or union expressions instead of doing a type cast, even when the compound type is no wider than a single byte. Equally, we must not fall back to just type casts to bit vectors when there is an array of structs/unions where those are exactly one byte wide.

Fixes: #7288

  • 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.

We need to create proper struct or union expressions instead of doing a
type cast, even when the compound type is no wider than a single byte.
Equally, we must not fall back to just type casts to bit vectors when
there is an array of structs/unions where those are exactly one byte
wide.

Fixes: diffblue#7288
@tautschnig
tautschnig force-pushed the bugfixes/7288-byte-byte-extract branch from a41d829 to 7d10a08 Compare December 8, 2022 20:38
@codecov

codecov Bot commented Dec 8, 2022

Copy link
Copy Markdown

Codecov Report

Base: 78.41% // Head: 78.41% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (7d10a08) compared to base (2653d78).
Patch coverage: 95.38% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7420   +/-   ##
========================================
  Coverage    78.41%   78.41%           
========================================
  Files         1655     1655           
  Lines       190264   190273    +9     
========================================
+ Hits        149201   149211   +10     
+ Misses       41063    41062    -1     
Impacted Files Coverage Δ
...strument/contracts/dynamic-frames/dfcc_library.cpp 95.54% <ø> (ø)
...cts/dynamic-frames/dfcc_lift_memory_predicates.cpp 89.60% <40.00%> (ø)
src/ansi-c/c_typecheck_expr.cpp 75.68% <100.00%> (ø)
...ument/contracts/dynamic-frames/dfcc_instrument.cpp 81.44% <100.00%> (ø)
...contracts/dynamic-frames/dfcc_pointer_in_range.cpp 100.00% <100.00%> (ø)
...t/contracts/dynamic-frames/dfcc_pointer_in_range.h 100.00% <100.00%> (ø)
src/util/lower_byte_operators.cpp 92.76% <100.00%> (+0.14%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@peterschrammel peterschrammel removed their assignment Dec 12, 2022
@tautschnig
tautschnig merged commit 91fadf4 into diffblue:develop Dec 12, 2022
@tautschnig
tautschnig deleted the bugfixes/7288-byte-byte-extract branch December 12, 2022 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Kani Bugs or features of importance to Kani Rust Verifier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to interpret this result?

3 participants