Skip to content

Commit

Permalink
Merge pull request #18507 from aschackmull/dataflow/join-fix
Browse files Browse the repository at this point in the history
Dataflow: Minor join-order fix
  • Loading branch information
aschackmull authored Jan 16, 2025
2 parents 9021214 + 4223971 commit fbf25e4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -3127,6 +3127,14 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
override predicate isSource() { sourceNode(node, state) }
}

bindingset[p, state, t, ap, stored]
pragma[inline_late]
private SummaryCtxSome mkSummaryCtxSome(
ParamNodeEx p, FlowState state, Typ t, Ap ap, TypOption stored
) {
result = TSummaryCtxSome(p, state, t, ap, stored)
}

pragma[nomagic]
private predicate fwdFlowInStep(
ArgNodeEx arg, ParamNodeEx p, FlowState state, Cc outercc, CcCall innercc,
Expand All @@ -3138,7 +3146,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
or
FwdFlowInThrough::fwdFlowIn(_, arg, _, p, state, outercc, innercc, outerSummaryCtx, t,
ap, stored, _) and
innerSummaryCtx = TSummaryCtxSome(p, state, t, ap, stored)
innerSummaryCtx = mkSummaryCtxSome(p, state, t, ap, stored)
}

pragma[nomagic]
Expand Down Expand Up @@ -3871,11 +3879,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
bindingset[node, state, t0, ap]
predicate filter(NodeEx node, FlowState state, Typ t0, Ap ap, Typ t) {
exists(state) and
// We can get away with not using type strengthening here, since we aren't
// going to use the tracked types in the construction of Stage 4 access
// paths. For Stage 4 and onwards, the tracked types must be consistent as
// the cons candidates including types are used to construct subsequent
// access path approximations.
t0 = t and
(
notExpectsContent(node)
Expand Down

0 comments on commit fbf25e4

Please sign in to comment.