Shared CFG: check abrupt completion origins - #147
Closed
yoff wants to merge 1 commit into
Closed
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Owner
Author
|
Closing in favor of the upstream pull request against github/codeql:main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
invalidAbruptCompletionOriginto the shared CFG consistency checks;Input2::beginAbruptCompletionorigins, requiring each origin to be eithernode.isIn(ast)ornode.isAdditional(ast, _);consistencyOverviewand add generated overview tests for every current consumer: Java, C#, and Python.This intentionally does not inspect the shared library's combined private
beginAbruptCompletion, whose unmatched final catch-clause completion legitimately originates atisAfterValue.Motivation
This follows the consistency-check suggestion from review of github#22380: github#22380 (comment). The change is independent of github#22380 and contains no Python-specific CFG behavior change.
Validation
codeql query compile --search-path=. java/ql/consistency-queries/CfgConsistency.ql csharp/ql/consistency-queries/CfgConsistency.ql python/ql/consistency-queries/CfgConsistency.qlcodeql test run --search-path=. --consistency-queries java/ql/consistency-queries -- java/ql/test/library-tests/controlflow/basic— 28 tests passedcodeql test run --search-path=. --consistency-queries csharp/ql/consistency-queries -- csharp/ql/test/library-tests/controlflow/graph— 13 tests passedcodeql test run --search-path=. --consistency-queries python/ql/consistency-queries -- python/ql/test/library-tests/ControlFlow/successors— 7 tests passedNo invalid abrupt-completion origins or unrelated expected-output churn were found in the three consuming languages.