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

Enable the function-pointer fall-back assertion by default #7011

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

tautschnig
Copy link
Collaborator

Function pointer removal may be done implicitly as required by some
other operation that the user intended to do. If so, the user would not
know that they need to specify --pointer-check at that point. Therefore,
enable the ASSERT(false) in the else branch of function pointer
removal unconditionally.

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

Remove unused variants and change the last parameter to become
mandatory. Avoiding the default parameter ensures that upcoming changes
to the list of parameters will not miss any call sites.
Function pointer removal may be done implicitly as required by some
other operation that the user intended to do. If so, the user would not
know that they need to specify --pointer-check at that point. Therefore,
enable the `ASSERT(false)` in the `else` branch of function pointer
removal unconditionally.
@tautschnig tautschnig force-pushed the bugfixes/6983-take-2 branch from fd75af5 to 86c8181 Compare July 14, 2022 10:19
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #7011 (86c8181) into develop (711cc67) will increase coverage by 0.00%.
The diff coverage is 97.05%.

@@           Coverage Diff            @@
##           develop    #7011   +/-   ##
========================================
  Coverage    77.85%   77.85%           
========================================
  Files         1569     1569           
  Lines       180670   180648   -22     
========================================
- Hits        140662   140646   -16     
+ Misses       40008    40002    -6     
Impacted Files Coverage Δ
.../analyses/variable-sensitivity/write_stack_entry.h 100.00% <ø> (ø)
src/goto-cc/armcc_cmdline.cpp 22.22% <ø> (ø)
src/goto-cc/gcc_cmdline.cpp 79.23% <ø> (ø)
src/goto-cc/ms_cl_cmdline.cpp 0.00% <ø> (ø)
src/goto-instrument/value_set_fi_fp_removal.cpp 100.00% <ø> (ø)
src/goto-programs/restrict_function_pointers.cpp 80.67% <ø> (ø)
unit/solvers/smt2_incremental/object_tracking.cpp 100.00% <ø> (ø)
src/analyses/variable-sensitivity/write_stack.cpp 87.50% <94.11%> (-0.12%) ⬇️
jbmc/src/jdiff/jdiff_parse_options.cpp 66.31% <100.00%> (-0.36%) ⬇️
...nalyses/variable-sensitivity/write_stack_entry.cpp 100.00% <100.00%> (ø)
... and 8 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 8b53dba...86c8181. Read the comment docs.

@tautschnig
Copy link
Collaborator Author

In follow-up work I will add an option to remove the assertion after previous instrumentation.

@tautschnig tautschnig merged commit 3c69aa1 into diffblue:develop Jul 20, 2022
@tautschnig tautschnig deleted the bugfixes/6983-take-2 branch July 20, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants