Skip to content

Union regression test of unspecified behaviour #5704

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
merged 1 commit into from
Jan 14, 2021

Conversation

tautschnig
Copy link
Collaborator

The C standard leaves the values of bytes not belonging to the object
representation of the member last stored unspecified, but GCC, Clang,
and Visual Studio all seem to behave just as CBMC currently does. Ensure
we maintain this behaviour via a regression test.

  • 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 Dec 29, 2020

Codecov Report

Merging #5704 (3cc70b1) into develop (67b36f0) will increase coverage by 2.20%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5704      +/-   ##
===========================================
+ Coverage    67.34%   69.54%   +2.20%     
===========================================
  Files         1234     1243       +9     
  Lines       100296   100702     +406     
===========================================
+ Hits         67548    70038    +2490     
+ Misses       32748    30664    -2084     
Flag Coverage Δ
cproversmt2 43.29% <ø> (ø)
regression 66.45% <ø> (ø)
unit 32.23% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/util/mathematical_expr.h 91.66% <0.00%> (-1.96%) ⬇️
src/goto-programs/goto_program.h 91.79% <0.00%> (-1.76%) ⬇️
src/util/std_types.h 94.46% <0.00%> (-0.01%) ⬇️
src/util/range.h 100.00% <0.00%> (ø)
src/util/optional_utils.h 100.00% <0.00%> (ø)
src/goto-symex/symex_target.h 100.00% <0.00%> (ø)
src/solvers/strings/array_pool.h 100.00% <0.00%> (ø)
src/goto-programs/class_hierarchy.h 100.00% <0.00%> (ø)
src/solvers/prop/bdd_expr.h 100.00% <0.00%> (ø)
src/util/memory_info.cpp 100.00% <0.00%> (ø)
... and 160 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67b36f0...3cc70b1. Read the comment docs.

@kroening
Copy link
Member

That one may be worth mentioning in the manual.

@tautschnig tautschnig self-assigned this Jan 1, 2021
The C standard leaves the values of bytes not belonging to the object
representation of the member last stored unspecified, but GCC, Clang,
and Visual Studio all seem to behave just as CBMC currently does. Ensure
we maintain this behaviour via a regression test.
@tautschnig
Copy link
Collaborator Author

That one may be worth mentioning in the manual.

Any proposals what section this could go into? That said, I'd view it as a temporary fix as an upcoming change will make it really easy to make this behaviour configurable.

@tautschnig
Copy link
Collaborator Author

I'll merge this one, and will leave working on documentation and/or making this behaviour configurable to #5705, which requires further work anyway.

@tautschnig tautschnig merged commit 7d6cb94 into diffblue:develop Jan 14, 2021
@tautschnig tautschnig deleted the union-test-2 branch January 14, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants