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

fixup! Simplify byte_extract(byte_update(...)) without overlap #7411

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

tautschnig
Copy link
Collaborator

This fixes a bits/bytes confusing, resulting in missed optimisations of byte_extract(byte_update(...)) nestings when the byte_extract was at an offset higher than the update. Found while debugging model-checking/kani#1958.

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

This fixes a bits/bytes confusing, resulting in missed optimisations of
byte_extract(byte_update(...)) nestings when the byte_extract was at
an offset higher than the update. Found while debugging
model-checking/kani#1958.
@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Base: 78.38% // Head: 78.36% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (917e39b) compared to base (794f6f7).
Patch coverage: 80.14% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7411      +/-   ##
===========================================
- Coverage    78.38%   78.36%   -0.02%     
===========================================
  Files         1647     1647              
  Lines       190343   189969     -374     
===========================================
- Hits        149196   148866     -330     
+ Misses       41147    41103      -44     
Impacted Files Coverage Δ
src/analyses/invariant_set.cpp 0.00% <0.00%> (ø)
src/analyses/invariant_set.h 0.00% <0.00%> (ø)
src/ansi-c/c_typecheck_base.cpp 83.09% <0.00%> (ø)
src/cpp/cpp_item.h 64.15% <0.00%> (-7.55%) ⬇️
src/cpp/cpp_typecheck_initializer.cpp 29.94% <0.00%> (ø)
src/cpp/expr2cpp.cpp 42.97% <0.00%> (ø)
src/goto-analyzer/unreachable_instructions.cpp 89.01% <ø> (ø)
src/goto-diff/change_impact.cpp 0.00% <0.00%> (ø)
src/goto-instrument/accelerate/accelerate.cpp 32.50% <0.00%> (+0.22%) ⬆️
src/goto-instrument/accelerate/polynomial.cpp 0.00% <0.00%> (ø)
... and 214 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.

tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 5, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 5, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
@feliperodri feliperodri added the aws Bugs or features of importance to AWS CBMC users label Dec 5, 2022
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.

Is there a test for this?

@tautschnig
Copy link
Collaborator Author

Is there a test for this?

#7413 will introduce a compile-time check for this one.

@tautschnig tautschnig merged commit 64f48d6 into diffblue:develop Dec 6, 2022
@tautschnig tautschnig deleted the bugfixes/b-e-b-u-fixup branch December 6, 2022 12:38
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 6, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 6, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 12, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 14, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 14, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Dec 15, 2022
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 12, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 12, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 12, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Feb 23, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request May 15, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request May 15, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jun 1, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jul 19, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Nov 17, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Nov 20, 2023
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 22, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 22, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 23, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Apr 23, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request May 8, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request May 8, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jun 20, 2024
Use mp_integers with a unit to clarify when an mp_integer holds a number
of bits or a number of bytes. This makes sure that type-inconsistent
comparisons as fixed in diffblue#7411 result in compile-time errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users blocker bugfix Kani Bugs or features of importance to Kani Rust Verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants