Skip to content

Commit e955f58

Browse files
aschackmullhvitved
authored andcommitted
Java: Bugfix for samevar in useReaches.
1 parent ed28435 commit e955f58

File tree

1 file changed

+4
-5
lines changed
  • java/ql/lib/semmle/code/java/dataflow/internal

1 file changed

+4
-5
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,13 +619,12 @@ private module Cached {
619619
useReaches(use, mid, sameVarMid) and
620620
DataFlowIntegration::localFlowStep(_, mid, node, _)
621621
|
622-
// flow into phi input node
623-
mid instanceof DataFlowIntegration::SsaInputNode and
624-
sameVar = false
625-
or
626-
// flow into definition
627622
exists(Impl::DefinitionExt def |
623+
// flow into definition
628624
def = mid.(DataFlowIntegration::SsaDefinitionExtNode).getDefinitionExt()
625+
or
626+
// flow into phi input node
627+
def = mid.(DataFlowIntegration::SsaInputNode).getDefinitionExt()
629628
|
630629
if def instanceof Impl::PhiReadNode then sameVar = sameVarMid else sameVar = false
631630
)

0 commit comments

Comments
 (0)