Skip to content

Commit 2fa8c2f

Browse files
authored
Merge pull request #15634 from aschackmull/dataflow/simpleglobal-fixreads
Dataflow: Bugfix for field reads in SimpleGlobal.
2 parents ce07d6a + 53801e8 commit 2fa8c2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module MakeImplCommon<InputSig Lang> {
8383
class LocalSourceNode extends Node {
8484
LocalSourceNode() {
8585
storeStep(_, this, _) or
86-
loadStep(_, this, _) or
86+
loadStep0(_, this, _) or
8787
jumpStepCached(_, this) or
8888
this instanceof ParamNode or
8989
this instanceof OutNodeExt
@@ -115,12 +115,14 @@ module MakeImplCommon<InputSig Lang> {
115115
// TODO: support setters
116116
predicate storeStep(Node n1, Node n2, Content f) { storeSet(n1, f, n2, _, _) }
117117

118-
predicate loadStep(Node n1, LocalSourceNode n2, Content f) {
118+
private predicate loadStep0(Node n1, Node n2, Content f) {
119119
readSet(n1, f, n2)
120120
or
121121
argumentValueFlowsThrough(n1, TReadStepTypesSome(_, f, _), n2)
122122
}
123123

124+
predicate loadStep(Node n1, LocalSourceNode n2, Content f) { loadStep0(n1, n2, f) }
125+
124126
predicate loadStoreStep(Node nodeFrom, Node nodeTo, Content f1, Content f2) { none() }
125127

126128
predicate withContentStep(Node nodeFrom, LocalSourceNode nodeTo, ContentFilter f) { none() }

0 commit comments

Comments
 (0)