Skip to content

Commit ddf6eb3

Browse files
committed
JS: Quick fix to make DeduplicatePathGraph compile
There's an open PR for this where a real fix should be written
1 parent 8ecdb5c commit ddf6eb3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

shared/dataflow/codeql/dataflow/DataFlow.qll

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,15 @@ module DataFlowMake<InputSig Lang> {
935935
exists(getAPathNode(node, toString))
936936
}
937937

938+
private predicate edgesProj(InputPathNode node1, InputPathNode node2) {
939+
Graph::edges(node2, node1, _, _)
940+
}
941+
938942
private module Pass1 =
939-
MakeDiscriminatorPass<initialCandidate/2, Graph::edges/2, Graph::subpaths/4>;
943+
MakeDiscriminatorPass<initialCandidate/2, edgesProj/2, Graph::subpaths/4>;
940944

941945
private predicate edgesRev(InputPathNode node1, InputPathNode node2) {
942-
Graph::edges(node2, node1)
946+
Graph::edges(node2, node1, _, _)
943947
}
944948

945949
private predicate subpathsRev(
@@ -1009,8 +1013,9 @@ module DataFlowMake<InputSig Lang> {
10091013
Graph::nodes(node.getAnOriginalPathNode(), key, val)
10101014
}
10111015

1012-
query predicate edges(PathNode node1, PathNode node2) {
1013-
Graph::edges(node1.getAnOriginalPathNode(), node2.getAnOriginalPathNode())
1016+
query predicate edges(PathNode node1, PathNode node2, string key, string val) {
1017+
// TODO: ensure deduplication preserves key/val sequence?
1018+
Graph::edges(node1.getAnOriginalPathNode(), node2.getAnOriginalPathNode(), key, val)
10141019
}
10151020

10161021
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {

0 commit comments

Comments
 (0)