@@ -24,11 +24,8 @@ class ArraySizeConfiguration extends ProductFlow::Configuration {
24
24
}
25
25
26
26
override predicate isSinkPair ( DataFlow:: Node sink1 , DataFlow:: Node sink2 ) {
27
- exists ( PointerAddInstruction pai , Instruction index , Bound b , int delta |
28
- pai .getRight ( ) = index and
29
- pai .getLeft ( ) = sink1 .asInstruction ( ) and
30
- bounded ( index , b , delta , true ) and
31
- sink2 .asInstruction ( ) = b .getInstruction ( ) and
27
+ exists ( PointerAddInstruction pai , int delta |
28
+ isSinkPair1 ( sink1 , sink2 , pai , delta ) and
32
29
(
33
30
delta = 0 and
34
31
exists ( DataFlow:: Node paiNode , DataFlow:: Node derefNode |
@@ -43,6 +40,18 @@ class ArraySizeConfiguration extends ProductFlow::Configuration {
43
40
}
44
41
}
45
42
43
+ pragma [ nomagic]
44
+ predicate isSinkPair1 (
45
+ DataFlow:: Node sink1 , DataFlow:: Node sink2 , PointerAddInstruction pai , int delta
46
+ ) {
47
+ exists ( Instruction index , ValueNumberBound b |
48
+ pai .getRight ( ) = index and
49
+ pai .getLeft ( ) = sink1 .asInstruction ( ) and
50
+ bounded ( index , b , delta , true ) and
51
+ sink2 .asInstruction ( ) = b .getInstruction ( )
52
+ )
53
+ }
54
+
46
55
from
47
56
ArraySizeConfiguration conf , DataFlow:: PathNode source1 , DataFlow2:: PathNode source2 ,
48
57
DataFlow:: PathNode sink1 , DataFlow2:: PathNode sink2
0 commit comments