mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Shared: Fix bad join.
This commit is contained in:
@@ -455,27 +455,42 @@ module MakeImplContentDataFlow<LocationSig Location, InputSig<Location> Lang> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pragma[nomagic]
|
||||||
|
private predicate nodeAndState(Flow::PathNode n, Node node, State state) {
|
||||||
|
n.getNode() = node and n.getState() = state
|
||||||
|
}
|
||||||
|
|
||||||
|
pragma[nomagic]
|
||||||
|
private predicate succNodeAndState(
|
||||||
|
Flow::PathNode pre, Node preNode, State preState, Flow::PathNode succ, Node succNode,
|
||||||
|
State succState
|
||||||
|
) {
|
||||||
|
nodeAndState(pre, preNode, preState) and
|
||||||
|
nodeAndState(succ, succNode, succState) and
|
||||||
|
pre.getASuccessor() = succ
|
||||||
|
}
|
||||||
|
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private predicate nodeReachesStore(
|
private predicate nodeReachesStore(
|
||||||
Flow::PathNode source, AccessPath scReads, AccessPath scStores, Flow::PathNode node,
|
Flow::PathNode source, AccessPath scReads, AccessPath scStores, Flow::PathNode target,
|
||||||
ContentSet c, AccessPath reads, AccessPath stores
|
ContentSet c, AccessPath reads, AccessPath stores
|
||||||
) {
|
) {
|
||||||
exists(Flow::PathNode mid |
|
exists(Flow::PathNode mid, State midState, Node midNode, State targetState, Node targetNode |
|
||||||
nodeReaches(source, scReads, scStores, mid, reads, stores) and
|
nodeReaches(source, scReads, scStores, mid, reads, stores) and
|
||||||
storeStep(mid.getNode(), mid.getState(), c, node.getNode(), node.getState()) and
|
succNodeAndState(mid, midNode, midState, target, targetNode, targetState) and
|
||||||
mid.getASuccessor() = node
|
storeStep(midNode, midState, c, targetNode, targetState)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private predicate nodeReachesRead(
|
private predicate nodeReachesRead(
|
||||||
Flow::PathNode source, AccessPath scReads, AccessPath scStores, Flow::PathNode node,
|
Flow::PathNode source, AccessPath scReads, AccessPath scStores, Flow::PathNode target,
|
||||||
ContentSet c, AccessPath reads, AccessPath stores
|
ContentSet c, AccessPath reads, AccessPath stores
|
||||||
) {
|
) {
|
||||||
exists(Flow::PathNode mid |
|
exists(Flow::PathNode mid, State midState, Node midNode, State targetState, Node targetNode |
|
||||||
nodeReaches(source, scReads, scStores, mid, reads, stores) and
|
nodeReaches(source, scReads, scStores, mid, reads, stores) and
|
||||||
readStep(mid.getNode(), mid.getState(), c, node.getNode(), node.getState()) and
|
succNodeAndState(mid, midNode, midState, target, targetNode, targetState) and
|
||||||
mid.getASuccessor() = node
|
readStep(midNode, midState, c, targetNode, targetState)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user