Skip to content

Assignments to bit-fields yield results of bit-field type #7270

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

Merged

Conversation

tautschnig
Copy link
Collaborator

Do not use the type of the assignment expression (which is the underlying type) to store the result.

Also fixes C pretty-printing of bit-field typed constants.

Issue was found by CSmith (test generated with random seed 1665747314).

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

Do not use the type of the assignment expression (which is the
underlying type) to store the result.

Also fixes C pretty-printing of bit-field typed constants.

Issue was found by CSmith (test generated with random seed 1665747314).
@codecov
Copy link

codecov bot commented Oct 23, 2022

Codecov Report

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

Coverage data is based on head (623cde5) compared to base (ddf0fd2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7270   +/-   ##
========================================
  Coverage    78.01%   78.01%           
========================================
  Files         1625     1625           
  Lines       187407   187411    +4     
========================================
+ Hits        146201   146205    +4     
  Misses       41206    41206           
Impacted Files Coverage Δ
src/ansi-c/expr2c.cpp 67.30% <100.00%> (+0.03%) ⬆️
src/goto-programs/goto_clean_expr.cpp 99.02% <100.00%> (ø)
src/goto-programs/goto_convert_side_effect.cpp 94.50% <100.00%> (+0.02%) ⬆️

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 tautschnig added the soundness Soundness bug? Review and add "aws" if it is, or remove "soundness" if it isn't. label Oct 24, 2022
@kroening kroening merged commit 24e9d5f into diffblue:develop Nov 1, 2022
@tautschnig tautschnig deleted the bugfixes/bitfield-side-effect branch November 1, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix soundness Soundness bug? Review and add "aws" if it is, or remove "soundness" if it isn't.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants