Skip to content

Commit 233dd43

Browse files
committed
Java: Port varBlockReaches fix to BaseSSA.qll
1 parent fb3060d commit 233dd43

File tree

1 file changed

+3
-1
lines changed
  • java/ql/src/semmle/code/java/dataflow/internal

1 file changed

+3
-1
lines changed

java/ql/src/semmle/code/java/dataflow/internal/BaseSSA.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ private module SsaImpl {
330330
* between `b1` and `b2`.
331331
*/
332332
private predicate varBlockReaches(BaseSsaSourceVariable v, BasicBlock b1, BasicBlock b2) {
333-
varOccursInBlock(v, b1) and b2 = b1.getABBSuccessor()
333+
varOccursInBlock(v, b1) and
334+
b2 = b1.getABBSuccessor() and
335+
blockPrecedesVar(v, b2)
334336
or
335337
exists(BasicBlock mid |
336338
varBlockReaches(v, b1, mid) and

0 commit comments

Comments
 (0)