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

Fix SE FPs: Improve fixed-count loops #7234

Closed
pavel-mikula-sonarsource opened this issue May 19, 2023 · 0 comments · Fixed by #7259
Closed

Fix SE FPs: Improve fixed-count loops #7234

pavel-mikula-sonarsource opened this issue May 19, 2023 · 0 comments · Fixed by #7259
Assignees
Labels
Area: CFG/SE CFG and SE related issues. Type: CFG/SE FPs Rule IS triggered when it shouldn't be for CFG and SE rules.
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

#7192 introduced a way to break away from fixed-count loops. This is currently implemented by not evaluating BoolConstraint for 2nd pass through the condition.

As a side effect, this also effects other similar conditions inside the loop body. As seen in #7233

To improve the situation, we need to

  • On the engine level, detect that we are in loop branching condition
  • Propagate this information into the SymbolicContext and take a decision based on that.

Loop branching condition has 2 successors, where one can reach back to the same block, while the other one can not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CFG/SE CFG and SE related issues. Type: CFG/SE FPs Rule IS triggered when it shouldn't be for CFG and SE rules.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants