mirror of
https://github.com/github/codeql.git
synced 2026-01-30 06:42:57 +01:00
Use basicLocalFlowStep instead of .getASuccessor
This prevents non-monotonic recursion through summary post-update nodes
This commit is contained in:
committed by
Owen Mansel-Chan
parent
afe7edc093
commit
873f496038
@@ -15,7 +15,9 @@ private predicate isInterfaceCallReceiver(
|
||||
|
||||
/** Gets a data-flow node that may flow into the receiver value of `call`, which is an interface value. */
|
||||
private DataFlow::Node getInterfaceCallReceiverSource(DataFlow::CallNode call) {
|
||||
isInterfaceCallReceiver(call, result.getASuccessor*(), _, _)
|
||||
exists(DataFlow::Node succ | basicLocalFlowStep*(result, succ) |
|
||||
isInterfaceCallReceiver(call, succ, _, _)
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the type of `nd`, which must be a valid type and not an interface type. */
|
||||
@@ -37,7 +39,7 @@ private predicate isConcreteValue(DataFlow::Node nd) {
|
||||
(
|
||||
exists(getConcreteType(nd))
|
||||
or
|
||||
forex(DataFlow::Node pred | pred = nd.getAPredecessor() | isConcreteValue(pred))
|
||||
forex(DataFlow::Node pred | basicLocalFlowStep(pred, nd) | isConcreteValue(pred))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ module Public {
|
||||
*/
|
||||
private DataFlow::Node getACalleeSource(DataFlow::CallNode cn) {
|
||||
result = cn.getCalleeNode() or
|
||||
result.getASuccessor() = getACalleeSource(cn)
|
||||
basicLocalFlowStep(result, getACalleeSource(cn))
|
||||
}
|
||||
|
||||
/** A data flow node that represents a call. */
|
||||
|
||||
Reference in New Issue
Block a user