Skip to content

Fix applicability condition of simplify_byte_update #6311

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

peterschrammel
Copy link
Member

The condition is supposed to guard against a crash in basic_string::replace in line 1896, which it fails to do if the offsets in the condition and the argument to replace don't match.

  • Each commit message has a non-empty body, explaining why the change was made.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

The condition is supposed to guard against a crash in
basic_string::replace, which it fails to do if the
offsets in the condition and the argument to replace
don't match.
@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #6311 (bbdfdb1) into develop (493bc71) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6311   +/-   ##
========================================
  Coverage    75.98%   75.98%           
========================================
  Files         1512     1512           
  Lines       163456   163456           
========================================
  Hits        124204   124204           
  Misses       39252    39252           
Impacted Files Coverage Δ
src/util/simplify_expr.cpp 84.71% <100.00%> (ø)

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 e4369b6...bbdfdb1. Read the comment docs.

Copy link
Contributor

@TGWDB TGWDB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, but it would be nice if we didn't have a magic number.

@peterschrammel
Copy link
Member Author

Looks ok, but it would be nice if we didn't have a magic number.

This will be done in #917

@peterschrammel peterschrammel merged commit 14d35cc into diffblue:develop Sep 13, 2021
@peterschrammel peterschrammel deleted the fix-simplify-byte-update branch September 13, 2021 13:19
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.

3 participants