Skip to content

Conversation

@yoff
Copy link
Contributor

@yoff yoff commented Nov 10, 2020

Add a step from that CfgNode to the corresponding EssaNode.
The intended effect is seen in ImpliesDataflow.expected.
The efeect seen in other .expected-files is that parameter nodes
change type, that the extra steps are seen, and that flow from
EssaVars is mirrored in flow from CfgNodes.
There is one surprise, which is the .0 node in
coverage/localFlow.expected.

Add a step from that `CfgNode` to the corresponding `EssaNode`.
The intended effect is seen in `ImpliesDataflow.expected`.
The efeect seen in other `.expected`-files is that parameter nodes
change type, that the extra steps are seen, and that flow from
`EssaVar`s is mirrored in flow from `CfgNode`s.
There is one surprise, which is the `.0` node in
`coverage/localFlow.expected`.
@yoff yoff requested a review from a team as a code owner November 10, 2020 22:10
EssaNode -> ControlFlowNode
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

Nice 👍

There is one surprise, which is the .0 node in coverage/localFlow.expected.

Yep, that seems to be part of the function we create to simulate the for-comprehension I'm not 100% on top of these, so I can't explain why we only see it for

x = [y for v in [[[[SOURCE]]]] for u in v for z in u for y in z]

and not for

x = [y for z in [[SOURCE]] for y in z]

@RasmusWL RasmusWL merged commit 6113985 into github:main Nov 11, 2020
RasmusWL added a commit to RasmusWL/codeql that referenced this pull request Nov 17, 2020
From a local evaluation against flask DB, after
github#4649 was merged we would get:

```
Tuple counts for TypeTracker::callStep#ff/2@a21b71:
9876     ~0%     {3} r1 = SCAN DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS I OUTPUT I.<2>, I.<0>, I.<1>
9876     ~2%     {3} r2 = JOIN r1 WITH project#DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS R ON FIRST 1 OUTPUT r1.<2>, R.<0>, r1.<1>
72388997 ~0%     {4} r3 = JOIN r2 WITH DataFlowPublic::ParameterNode::isParameterOf_dispred#fff_201#join_rhs AS R ON FIRST 1 OUTPUT r2.<2>, R.<2>, r2.<1>, R.<1>
4952     ~0%     {2} r4 = JOIN r3 WITH DataFlowPrivate::DataFlowCall::getCallable_dispred#ff AS R ON FIRST 2 OUTPUT r3.<2>, r3.<3>
                     return r4
```
RasmusWL added a commit to RasmusWL/codeql that referenced this pull request Nov 18, 2020
From a local evaluation against flask DB, after
github#4649 was merged we would get:

```
Tuple counts for TypeTracker::callStep#ff/2@a21b71:
9876     ~0%     {3} r1 = SCAN DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS I OUTPUT I.<2>, I.<0>, I.<1>
9876     ~2%     {3} r2 = JOIN r1 WITH project#DataFlowPrivate::DataFlowCall::getArg_dispred#fff AS R ON FIRST 1 OUTPUT r1.<2>, R.<0>, r1.<1>
72388997 ~0%     {4} r3 = JOIN r2 WITH DataFlowPublic::ParameterNode::isParameterOf_dispred#fff_201#join_rhs AS R ON FIRST 1 OUTPUT r2.<2>, R.<2>, r2.<1>, R.<1>
4952     ~0%     {2} r4 = JOIN r3 WITH DataFlowPrivate::DataFlowCall::getCallable_dispred#ff AS R ON FIRST 2 OUTPUT r3.<2>, r3.<3>
                     return r4
```
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.

2 participants