Skip to content

Commit 6d247bf

Browse files
authored
Merge pull request github#7330 from tausbn/python-fix-bad-adjacentuseuse-join
Python: Fix bad join in SSA
2 parents e7209d1 + a716482 commit 6d247bf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/ql/lib/semmle/python/essa/SsaCompute.qll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,11 @@ private module SsaComputeImpl {
478478
predicate adjacentUseUse(ControlFlowNode use1, ControlFlowNode use2) {
479479
adjacentUseUseSameVar(use1, use2)
480480
or
481-
exists(SsaSourceVariable v, EssaDefinition def, BasicBlock b1, int i1, BasicBlock b2, int i2 |
481+
exists(SsaSourceVariable v, PhiFunction def, BasicBlock b1, int i1, BasicBlock b2, int i2 |
482482
adjacentVarRefs(v, b1, i1, b2, i2) and
483-
variableUse(v, use1, b1, i1) and
484-
definesAt(def, v, b2, i2) and
485-
firstUse(def, use2) and
486-
def instanceof PhiFunction
483+
variableUse(pragma[only_bind_into](v), use1, b1, i1) and
484+
definesAt(def, pragma[only_bind_into](v), b2, i2) and
485+
firstUse(def, use2)
487486
)
488487
}
489488

0 commit comments

Comments
 (0)