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

Dataflow: Simplify references to access paths from prior stage. #18258

Merged
merged 14 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ edges
| B.java:154:17:154:28 | source(...) : String | B.java:175:5:175:6 | String s2 : String | provenance | |
| B.java:158:7:158:13 | parameter this : MyLocal [String s1] : String | B.java:159:18:159:19 | this : MyLocal [String s1] : String | provenance | |
| B.java:158:7:158:13 | parameter this : MyLocal [String s2] : String | B.java:160:14:160:15 | this : MyLocal [String s2] : String | provenance | |
| B.java:158:7:158:13 | parameter this : MyLocal [String s2] : String | B.java:160:14:160:15 | this : MyLocal [String s2] : String | provenance | |
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these test changes expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. When a callable has both flow-through and flow to a sink without flow-through and the difference is dependent on the access path (and not just if it is empty or not), then we generate slightly more nodes, since we can no longer determine with the same level of precision whether we need to remember a summary context or not. To pinpoint it in the code, this is due to the change to PrevStage::parameterMayFlowThrough using an emptyAp boolean instead of ApApprox in its use in callEdgeArgParamRestricted.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know that this is expected.

| B.java:159:9:159:12 | this [post update] : MyLocal [f] : String | B.java:158:7:158:13 | parameter this [Return] : MyLocal [f] : String | provenance | |
| B.java:159:18:159:19 | s1 : String | B.java:159:9:159:12 | this [post update] : MyLocal [f] : String | provenance | |
| B.java:159:18:159:19 | this : MyLocal [String s1] : String | B.java:159:18:159:19 | s1 : String | provenance | |
| B.java:160:14:160:15 | this : MyLocal [String s2] : String | B.java:160:14:160:15 | s2 | provenance | |
| B.java:160:14:160:15 | this : MyLocal [String s2] : String | B.java:160:14:160:15 | s2 | provenance | |
| B.java:162:12:162:15 | parameter this : MyLocal [String s2] : String | B.java:164:14:164:15 | this : MyLocal [String s2] : String | provenance | |
| B.java:162:12:162:15 | parameter this : MyLocal [f] : String | B.java:163:14:163:14 | this <.field> : MyLocal [f] : String | provenance | |
| B.java:163:14:163:14 | this <.field> : MyLocal [f] : String | B.java:163:14:163:14 | f | provenance | |
Expand Down Expand Up @@ -464,12 +466,14 @@ nodes
| B.java:154:17:154:28 | source(...) : String | semmle.label | source(...) : String |
| B.java:158:7:158:13 | parameter this : MyLocal [String s1] : String | semmle.label | parameter this : MyLocal [String s1] : String |
| B.java:158:7:158:13 | parameter this : MyLocal [String s2] : String | semmle.label | parameter this : MyLocal [String s2] : String |
| B.java:158:7:158:13 | parameter this : MyLocal [String s2] : String | semmle.label | parameter this : MyLocal [String s2] : String |
| B.java:158:7:158:13 | parameter this [Return] : MyLocal [f] : String | semmle.label | parameter this [Return] : MyLocal [f] : String |
| B.java:159:9:159:12 | this [post update] : MyLocal [f] : String | semmle.label | this [post update] : MyLocal [f] : String |
| B.java:159:18:159:19 | s1 : String | semmle.label | s1 : String |
| B.java:159:18:159:19 | this : MyLocal [String s1] : String | semmle.label | this : MyLocal [String s1] : String |
| B.java:160:14:160:15 | s2 | semmle.label | s2 |
| B.java:160:14:160:15 | this : MyLocal [String s2] : String | semmle.label | this : MyLocal [String s2] : String |
| B.java:160:14:160:15 | this : MyLocal [String s2] : String | semmle.label | this : MyLocal [String s2] : String |
| B.java:162:12:162:15 | parameter this : MyLocal [String s2] : String | semmle.label | parameter this : MyLocal [String s2] : String |
| B.java:162:12:162:15 | parameter this : MyLocal [f] : String | semmle.label | parameter this : MyLocal [f] : String |
| B.java:163:14:163:14 | f | semmle.label | f |
Expand Down
Loading
Loading