Skip to content

Fix union initialization #5967

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
Apr 21, 2021
Merged

Conversation

tautschnig
Copy link
Collaborator

The attached test shows that we could reach recursive initialisation of
unions with a byte_update instead of a union expression. The test was
constructed using creduce, starting from code included in the Linux
kernel.

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

@tautschnig tautschnig marked this pull request as ready for review March 31, 2021 15:11
@tautschnig tautschnig assigned kroening and unassigned tautschnig Mar 31, 2021
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #5967 (29b284f) into develop (7663a57) will decrease coverage by 0.02%.
The diff coverage is 58.18%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5967      +/-   ##
===========================================
- Coverage    74.30%   74.27%   -0.03%     
===========================================
  Files         1444     1444              
  Lines       157453   157460       +7     
===========================================
- Hits        116995   116953      -42     
- Misses       40458    40507      +49     
Impacted Files Coverage Δ
src/solvers/smt2/smt2_conv.h 100.00% <ø> (ø)
src/ansi-c/c_typecheck_initializer.cpp 61.61% <44.44%> (-12.97%) ⬇️
src/solvers/smt2/smt2_conv.cpp 60.38% <52.94%> (ø)
src/solvers/smt2/smt2_solver.cpp 83.11% <65.51%> (ø)
src/util/config.cpp 55.42% <0.00%> (+3.03%) ⬆️
src/util/config.h 62.50% <0.00%> (+12.50%) ⬆️

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 4889328...29b284f. Read the comment docs.

The attached test shows that we could reach recursive initialisation of
unions with a byte_update instead of a union expression, which was added
in a8592a7. That previous fix did not consider the case of multiple
sub-members being initialised.

The test was constructed using creduce, starting from code included in
the Linux kernel.
@tautschnig tautschnig assigned tautschnig and unassigned kroening Apr 21, 2021
@tautschnig tautschnig merged commit 2fdf995 into diffblue:develop Apr 21, 2021
@tautschnig tautschnig deleted the union-init branch April 21, 2021 15:32
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.

3 participants