@@ -521,9 +521,9 @@ private predicate getFieldSizeOfClass(Class c, Type type, int size) {
521
521
522
522
cached
523
523
private predicate simpleInstructionLocalFlowStep ( Operand opFrom , Instruction iTo ) {
524
- iTo .( CopyInstruction ) .getSourceValue ( ) = opFrom . getDef ( )
524
+ iTo .( CopyInstruction ) .getSourceValueOperand ( ) = opFrom and not opFrom . isDefinitionInexact ( )
525
525
or
526
- iTo .( PhiInstruction ) .getAnInput ( ) = opFrom . getDef ( )
526
+ iTo .( PhiInstruction ) .getAnInputOperand ( ) = opFrom and not opFrom . isDefinitionInexact ( )
527
527
or
528
528
// A read side effect is almost never exact since we don't know exactly how
529
529
// much memory the callee will read.
@@ -542,7 +542,7 @@ private predicate simpleInstructionLocalFlowStep(Operand opFrom, Instruction iTo
542
542
// leads to a phi node.
543
543
exists ( InitializeIndirectionInstruction init |
544
544
opFrom .getAnyDef ( ) = init and
545
- iTo .( LoadInstruction ) .getSourceValueOperand ( ) . getAnyDef ( ) = init and
545
+ iTo .( LoadInstruction ) .getSourceValueOperand ( ) = opFrom and
546
546
// Check that the types match. Otherwise we can get flow from an object to
547
547
// its fields, which leads to field conflation when there's flow from other
548
548
// fields to the object elsewhere.
@@ -551,11 +551,13 @@ private predicate simpleInstructionLocalFlowStep(Operand opFrom, Instruction iTo
551
551
)
552
552
or
553
553
// Treat all conversions as flow, even conversions between different numeric types.
554
- iTo .( ConvertInstruction ) .getUnary ( ) = opFrom . getDef ( )
554
+ iTo .( ConvertInstruction ) .getUnaryOperand ( ) = opFrom and not opFrom . isDefinitionInexact ( )
555
555
or
556
- iTo .( CheckedConvertOrNullInstruction ) .getUnary ( ) = opFrom .getDef ( )
556
+ iTo .( CheckedConvertOrNullInstruction ) .getUnaryOperand ( ) = opFrom and
557
+ not opFrom .isDefinitionInexact ( )
557
558
or
558
- iTo .( InheritanceConversionInstruction ) .getUnary ( ) = opFrom .getDef ( )
559
+ iTo .( InheritanceConversionInstruction ) .getUnaryOperand ( ) = opFrom and
560
+ not opFrom .isDefinitionInexact ( )
559
561
or
560
562
// A chi instruction represents a point where a new value (the _partial_
561
563
// operand) may overwrite an old value (the _total_ operand), but the alias
0 commit comments