Skip to content

nondet-volatile: fix handling of enum types #8203

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
Mar 12, 2024

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Feb 13, 2024

namespacet::follow does not follow enum tags. Use follow_tag instead
to avoid unbounded recursion when using nondet-volatile on programs that
use enums.

  • 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 force-pushed the bugfixes/follow-enum-tag branch 2 times, most recently from 808a575 to 0e3e26f Compare February 13, 2024 12:56
@tautschnig tautschnig self-assigned this Feb 13, 2024
`namespacet::follow` does not follow enum tags. Use `follow_tag` instead
to avoid unbounded recursion when using nondet-volatile on programs that
use enums.
@tautschnig tautschnig changed the title namespacet::follow: also follow enum tags nondet-volatile: fix handling of enum types Feb 19, 2024
@tautschnig tautschnig force-pushed the bugfixes/follow-enum-tag branch from 0e3e26f to 4465a38 Compare February 19, 2024 15:03
@tautschnig tautschnig assigned martin-cs and unassigned kroening Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1939544) 79.66% compared to head (4465a38) 79.66%.

Files Patch % Lines
src/goto-instrument/nondet_volatile.cpp 66.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8203   +/-   ##
========================================
  Coverage    79.66%   79.66%           
========================================
  Files         1682     1682           
  Lines       195378   195380    +2     
========================================
+ Hits        155642   155646    +4     
+ Misses       39736    39734    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tautschnig added a commit to tautschnig/cbmc that referenced this pull request Feb 19, 2024
Follows struct and union tags, but does not follow enum tags. This is
not obvious from its documentation, and led to surprising behaviour as
seen (and fixed) in diffblue#8203. Using
suitable variants of `follow_tag` is safer.
@tautschnig tautschnig mentioned this pull request Feb 19, 2024
3 tasks
@tautschnig tautschnig removed their assignment Feb 19, 2024
@tautschnig tautschnig merged commit dbffea6 into diffblue:develop Mar 12, 2024
@tautschnig tautschnig deleted the bugfixes/follow-enum-tag branch March 12, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants