Skip to content

Conversation

@esteffin
Copy link
Contributor

@esteffin esteffin commented Nov 7, 2025

Reverts #20645

Reverting as this causes stable timeout regressions in projects with different sizes.

owen-mc and others added 30 commits October 29, 2025 12:03
Otherwise the test output changes when unrelated models are added.
Moves the existing points-to predicates to the newly added class
`ControlFlowNodeWithPointsTo` which resides in the `LegacyPointsTo`
module.

(Existing code that uses these predicates should import this module, and
references to `ControlFlowNode` should be changed to
`ControlFlowNodeWithPointsTo`.)

Also updates all existing points-to based code to do just this.
This had only two uses in our libraries, so I simply inlined the
predicate body in both places.
I wasn't entirely sure if this should be classified as `deprecated` or
`breaking`, but seeing as these changes technically _could_ break
existing queries (requiring a small rewrite), I opted for the latter.
Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
Co-authored-by: Tom Hvitved <hvitved@github.com>
IdrissRio and others added 5 commits November 6, 2025 11:12
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
Rust: Handle variables introduced in if-let guards
CODEOWNERS: Add code-scanning-language-coverage team to all extractors
Add 'code-quality-extended' to query packs list
Copilot AI review requested due to automatic review settings November 7, 2025 16:17
@esteffin esteffin requested a review from a team as a code owner November 7, 2025 16:17
@github-actions github-actions bot added the C++ label Nov 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the bounds estimation optimization from the simple range analysis library, which was designed to prevent combinatorial explosion by widening when too many bounds were predicted.

  • Removed the BoundsEstimate module that estimated the number of bounds
  • Simplified widening to only apply to recursive expressions, not estimated-large expressions
  • Removed pathological test cases that tested the bounds estimation feature

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll Removed BoundsEstimate module, widenLowerBound/widenUpperBound helper functions, and debug module; simplified widening conditions to only check isRecursiveBinary/isRecursiveDef
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c Removed repeated_if_statements, conditional_nested_guards, and many_conditional_assignments test functions that tested bounds estimation
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql Deleted test query for estimating number of bounds
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected Updated expected results after removing test cases (auto-generated)
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected Updated expected results after removing test cases (auto-generated)
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected Updated expected results after removing test cases (auto-generated)
cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected Updated expected results after removing test cases (auto-generated)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jketema
Copy link
Contributor

jketema commented Nov 7, 2025

This needs to target the release branch, not main. @mbg should be able to guide you through the process. Note that the location of any release note will have changed on the release branch.

@esteffin esteffin changed the base branch from main to codeql-cli-2.23.4 November 7, 2025 16:23
@esteffin esteffin requested review from a team and RasmusWL as code owners November 7, 2025 16:24
@esteffin
Copy link
Contributor Author

esteffin commented Nov 7, 2025

Wrong revert as it targets the wrong branch.

Will close and reopen it correctly

@esteffin esteffin closed this Nov 7, 2025
@esteffin esteffin deleted the revert-20645-cpp/range-analysis-measure branch November 7, 2025 16:28
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.