Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new self-edge causes offset reads to lose their constant-array sources in the quantum model, and the updated expectations accept unknown sources rather than fixing the downstream flow regression.
1 open issue
What changed in this PR
This PR aligns C++ data-flow definition handling with use handling by removing the array-specific indirection lower bound in isDef.
Changes:
- Start definition indirections at one and adjust their indexing.
- Correct array-flow test annotations and add a local-array regression case.
- Update data-flow and experimental quantum expectations.
| File | Description |
|---|---|
cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp |
Corrects array-flow annotations and adds local-array coverage. |
cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected |
Updates expected source-to-sink flows for arrays. |
cpp/ql/test/experimental/library-tests/quantum/node_edges.expected |
Updates source edges for offset message inputs. |
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll |
Removes the type-dependent lower bound from isDef. |
Review effort: Balanced (adaptive)
This branch has not been deployed
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.

On
mainwe have an ugly asymmetry between isDef (which has a special-case forAarrayTypes hidden inside thegetMinIndirectionsForTypepredicate) and isUse (which uses no such predicate).It turns out the inclusion of this predicate in
isDefwas incorrect and the tests were incorrectly labeled. Luckily, fixing this asymmetry fixes the tests as well.