Skip to content

Commit e185e90

Browse files
committed
Shared SSA: Fix consistency tests
1 parent 9d072a1 commit e185e90

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImplCommon.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,17 +645,18 @@ module Consistency {
645645

646646
query predicate nonUniqueDef(RelevantDefinition def, SourceVariable v, BasicBlock bb, int i) {
647647
ssaDefReachesRead(v, def, bb, i) and
648-
not exists(unique(Definition def0 | ssaDefReachesRead(_, def0, bb, i)))
648+
not exists(unique(Definition def0 | ssaDefReachesRead(v, def0, bb, i)))
649649
}
650650

651651
query predicate readWithoutDef(SourceVariable v, BasicBlock bb, int i) {
652652
variableRead(bb, i, v, _) and
653-
not ssaDefReachesRead(_, _, bb, i)
653+
not ssaDefReachesRead(v, _, bb, i)
654654
}
655655

656656
query predicate deadDef(RelevantDefinition def, SourceVariable v) {
657657
v = def.getSourceVariable() and
658658
not ssaDefReachesRead(_, def, _, _) and
659-
not phiHasInputFromBlock(_, def, _)
659+
not phiHasInputFromBlock(_, def, _) and
660+
not uncertainWriteDefinitionInput(_, def)
660661
}
661662
}

0 commit comments

Comments
 (0)