Skip to content

Commit 6fc8b35

Browse files
committed
Shared: Disable dynamic join ordering for select predicates
1 parent 1bc4e40 commit 6fc8b35

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
14901490

14911491
private module RevTypeFlow = TypeFlow<RevTypeFlowInput>;
14921492

1493+
pragma[no_dynamic_join_order]
14931494
pragma[nomagic]
14941495
private predicate flowIntoCallApValid(Call call, Callable c, ArgNd arg, ParamNd p, Ap ap) {
14951496
flowIntoCallAp(call, c, arg, p, ap) and
@@ -1506,6 +1507,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
15061507
)
15071508
}
15081509

1510+
pragma[no_dynamic_join_order]
15091511
private predicate revFlowIn(Call call, Callable c, ArgNd arg, Ap ap) {
15101512
exists(ParamNd p |
15111513
revFlow(p, TReturnCtxNone(), _, ap) and

‎shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
10041004

10051005
private predicate relevantType(Type t) { t = getNodeType(_) }
10061006

1007+
pragma[no_dynamic_join_order]
10071008
cached
10081009
predicate isTopType(Type t) {
10091010
strictcount(Type t0 | relevantType(t0)) =
@@ -1513,6 +1514,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
15131514
Cand::argumentValueFlowsThroughCand(arg, _, _)
15141515
}
15151516

1517+
pragma[no_dynamic_join_order]
15161518
pragma[nomagic]
15171519
private predicate argumentValueFlowsThrough0(
15181520
Call call, ArgNode arg, ReturnKind kind, ReadStepTypesOption read, string model,
@@ -2132,6 +2134,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
21322134
* the current data flow stage has reached the call of `arg` from one of its
21332135
* call targets.
21342136
*/
2137+
pragma[no_dynamic_join_order]
21352138
private predicate typeFlowArgTypeFromReturn(ArgNode arg, Type t) {
21362139
exists(ParamNode p, Type t1, Type t2 |
21372140
dataFlowTakenCallEdgeOut(_, _, arg, p) and

‎shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ module RangeStage<
866866
* - `upper = true` : `v <= b + delta`
867867
* - `upper = false` : `v >= b + delta`
868868
*/
869+
pragma[no_dynamic_join_order]
869870
private predicate boundedSsa(
870871
Sem::SsaVariable v, SemBound b, D::Delta delta, SsaReadPosition pos, boolean upper,
871872
boolean fromBackEdge, D::Delta origdelta, SemReason reason
@@ -1289,6 +1290,7 @@ module RangeStage<
12891290
* - `upper = true` : `e <= b + delta`
12901291
* - `upper = false` : `e >= b + delta`
12911292
*/
1293+
pragma[no_dynamic_join_order]
12921294
predicate initialBounded(
12931295
Sem::Expr e, SemBound b, D::Delta delta, boolean upper, boolean fromBackEdge,
12941296
D::Delta origdelta, SemReason reason

0 commit comments

Comments
 (0)