Skip to content

Commit 79440f6

Browse files
committed
Data flow: Fix bad join
``` Evaluated relational algebra for predicate DataFlowImpl::Impl<PolynomialReDoSQuery::PolynomialReDoSFlow::C>::storeEx/5#34133ef9@0425e0m7 with tuple counts: 2209132 ~1% {6} r1 = SCAN `DataFlowImpl::Impl<PolynomialReDoSQuery::PolynomialReDoSFlow::C>::storeExUnrestricted/5#3a86a98e` OUTPUT In.1, In.0, In.1, In.2, In.3, In.4 4338565685 ~1% {6} | JOIN WITH `DataFlowPublic::ContentSet.getAReadContent/0#dispred#e4acf74e_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5 34811200 ~1428% {5} | JOIN WITH `project#DataFlowImpl::Impl<PolynomialReDoSQuery::PolynomialReDoSFlow::C>::readSetEx/3#35ac556a` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5 return r1 ```
1 parent c2f91a5 commit 79440f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,15 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
460460
stepFilter(node1, node2)
461461
}
462462

463+
pragma[nomagic]
464+
private predicate hasReadStep(Content c) { read(_, c, _) }
465+
463466
pragma[nomagic]
464467
private predicate storeEx(
465468
NodeEx node1, Content c, NodeEx node2, DataFlowType contentType, DataFlowType containerType
466469
) {
467470
storeExUnrestricted(node1, c, node2, contentType, containerType) and
468-
read(_, c, _)
471+
hasReadStep(c)
469472
}
470473

471474
pragma[nomagic]

0 commit comments

Comments
 (0)