svf-lib 1.0.1729 → 1.0.1731
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-linux/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-linux/svf/include/AbstractExecution/SVFIR2ItvExeState.h +2 -5
- package/SVF-linux/svf/include/MemoryModel/AccessPath.h +13 -11
- package/SVF-linux/svf/include/SVFIR/SVFStatements.h +2 -3
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +2 -5
- package/SVF-osx/svf/include/MemoryModel/AccessPath.h +13 -11
- package/SVF-osx/svf/include/SVFIR/SVFStatements.h +2 -3
- package/package.json +1 -1
|
Binary file
|
|
@@ -73,11 +73,8 @@ public:
|
|
|
73
73
|
/// Return the field address given a pointer points to a struct object and an offset
|
|
74
74
|
VAddrs getGepObjAddress(u32_t pointer, APOffset offset);
|
|
75
75
|
|
|
76
|
-
/// Return the
|
|
77
|
-
IntervalValue
|
|
78
|
-
|
|
79
|
-
/// Return the Index offset from one gep param offset
|
|
80
|
-
IntervalValue getItvOfFlattenedElemIndexFromGepTypePair(const AccessPath::IdxVarAndGepTypePair& gep_pair, const GepStmt *gep);
|
|
76
|
+
/// Return the value range of Integer SVF Type, e.g. unsigned i8 Type->[0, 255], signed i8 Type->[-128, 127]
|
|
77
|
+
IntervalValue getRangeLimitFromType(const SVFType* type);
|
|
81
78
|
|
|
82
79
|
/// Return the byte offset expression of a GepStmt
|
|
83
80
|
/// elemBytesize is the element byte size of an static alloc or heap alloc array
|
|
@@ -61,8 +61,8 @@ public:
|
|
|
61
61
|
NonOverlap, Overlap, Subset, Superset, Same
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
typedef std::pair<const SVFVar*, const SVFType*>
|
|
65
|
-
typedef std::vector<
|
|
64
|
+
typedef std::pair<const SVFVar*, const SVFType*> IdxOperandPair;
|
|
65
|
+
typedef std::vector<IdxOperandPair> IdxOperandPairs;
|
|
66
66
|
|
|
67
67
|
/// Constructor
|
|
68
68
|
AccessPath(APOffset o = 0) : fldIdx(o) {}
|
|
@@ -70,7 +70,7 @@ public:
|
|
|
70
70
|
/// Copy Constructor
|
|
71
71
|
AccessPath(const AccessPath& ap)
|
|
72
72
|
: fldIdx(ap.fldIdx),
|
|
73
|
-
|
|
73
|
+
idxOperandPairs(ap.getIdxOperandPairVec())
|
|
74
74
|
{
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -83,13 +83,13 @@ public:
|
|
|
83
83
|
inline const AccessPath& operator=(const AccessPath& rhs)
|
|
84
84
|
{
|
|
85
85
|
fldIdx = rhs.fldIdx;
|
|
86
|
-
|
|
86
|
+
idxOperandPairs = rhs.getIdxOperandPairVec();
|
|
87
87
|
return *this;
|
|
88
88
|
}
|
|
89
89
|
inline bool operator==(const AccessPath& rhs) const
|
|
90
90
|
{
|
|
91
91
|
return this->fldIdx == rhs.fldIdx &&
|
|
92
|
-
this->
|
|
92
|
+
this->idxOperandPairs == rhs.idxOperandPairs;
|
|
93
93
|
}
|
|
94
94
|
//@}
|
|
95
95
|
|
|
@@ -103,9 +103,9 @@ public:
|
|
|
103
103
|
{
|
|
104
104
|
fldIdx = idx;
|
|
105
105
|
}
|
|
106
|
-
inline const
|
|
106
|
+
inline const IdxOperandPairs& getIdxOperandPairVec() const
|
|
107
107
|
{
|
|
108
|
-
return
|
|
108
|
+
return idxOperandPairs;
|
|
109
109
|
}
|
|
110
110
|
//@}
|
|
111
111
|
|
|
@@ -151,6 +151,9 @@ public:
|
|
|
151
151
|
return computeAllLocations().intersects(RHS.computeAllLocations());
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/// Return byte offset from the beginning of the structure to the field where it is located for struct type
|
|
155
|
+
u32_t getStructFieldOffset(const SVFVar* idxOperandVar, const SVFStructType* idxOperandType) const;
|
|
156
|
+
|
|
154
157
|
/// Dump location set
|
|
155
158
|
std::string dump() const;
|
|
156
159
|
|
|
@@ -163,8 +166,7 @@ private:
|
|
|
163
166
|
NodeBS computeAllLocations() const;
|
|
164
167
|
|
|
165
168
|
APOffset fldIdx; ///< Accumulated Constant Offsets
|
|
166
|
-
|
|
167
|
-
offsetVarAndGepTypePairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>s
|
|
169
|
+
IdxOperandPairs idxOperandPairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>
|
|
168
170
|
};
|
|
169
171
|
|
|
170
172
|
} // End namespace SVF
|
|
@@ -174,9 +176,9 @@ template <> struct std::hash<SVF::AccessPath>
|
|
|
174
176
|
size_t operator()(const SVF::AccessPath &ap) const
|
|
175
177
|
{
|
|
176
178
|
SVF::Hash<std::pair<SVF::NodeID, SVF::NodeID>> h;
|
|
177
|
-
std::hash<SVF::AccessPath::
|
|
179
|
+
std::hash<SVF::AccessPath::IdxOperandPairs> v;
|
|
178
180
|
return h(std::make_pair(ap.getConstantFieldIdx(),
|
|
179
|
-
v(ap.
|
|
181
|
+
v(ap.getIdxOperandPairVec())));
|
|
180
182
|
}
|
|
181
183
|
};
|
|
182
184
|
|
|
@@ -492,10 +492,9 @@ public:
|
|
|
492
492
|
{
|
|
493
493
|
return ap;
|
|
494
494
|
}
|
|
495
|
-
inline const AccessPath::
|
|
496
|
-
getOffsetVarAndGepTypePairVec() const
|
|
495
|
+
inline const AccessPath::IdxOperandPairs getOffsetVarAndGepTypePairVec() const
|
|
497
496
|
{
|
|
498
|
-
return getAccessPath().
|
|
497
|
+
return getAccessPath().getIdxOperandPairVec();
|
|
499
498
|
}
|
|
500
499
|
/// Return TRUE if this is a constant location set.
|
|
501
500
|
inline bool isConstantOffset() const
|
|
Binary file
|
|
Binary file
|
|
@@ -73,11 +73,8 @@ public:
|
|
|
73
73
|
/// Return the field address given a pointer points to a struct object and an offset
|
|
74
74
|
VAddrs getGepObjAddress(u32_t pointer, APOffset offset);
|
|
75
75
|
|
|
76
|
-
/// Return the
|
|
77
|
-
IntervalValue
|
|
78
|
-
|
|
79
|
-
/// Return the Index offset from one gep param offset
|
|
80
|
-
IntervalValue getItvOfFlattenedElemIndexFromGepTypePair(const AccessPath::IdxVarAndGepTypePair& gep_pair, const GepStmt *gep);
|
|
76
|
+
/// Return the value range of Integer SVF Type, e.g. unsigned i8 Type->[0, 255], signed i8 Type->[-128, 127]
|
|
77
|
+
IntervalValue getRangeLimitFromType(const SVFType* type);
|
|
81
78
|
|
|
82
79
|
/// Return the byte offset expression of a GepStmt
|
|
83
80
|
/// elemBytesize is the element byte size of an static alloc or heap alloc array
|
|
@@ -57,8 +57,8 @@ public:
|
|
|
57
57
|
NonOverlap, Overlap, Subset, Superset, Same
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
typedef std::pair<const SVFVar*, const SVFType*>
|
|
61
|
-
typedef std::vector<
|
|
60
|
+
typedef std::pair<const SVFVar*, const SVFType*> IdxOperandPair;
|
|
61
|
+
typedef std::vector<IdxOperandPair> IdxOperandPairs;
|
|
62
62
|
|
|
63
63
|
/// Constructor
|
|
64
64
|
AccessPath(APOffset o = 0) : fldIdx(o) {}
|
|
@@ -66,7 +66,7 @@ public:
|
|
|
66
66
|
/// Copy Constructor
|
|
67
67
|
AccessPath(const AccessPath& ap)
|
|
68
68
|
: fldIdx(ap.fldIdx),
|
|
69
|
-
|
|
69
|
+
idxOperandPairs(ap.getIdxOperandPairVec())
|
|
70
70
|
{
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -79,13 +79,13 @@ public:
|
|
|
79
79
|
inline const AccessPath& operator=(const AccessPath& rhs)
|
|
80
80
|
{
|
|
81
81
|
fldIdx = rhs.fldIdx;
|
|
82
|
-
|
|
82
|
+
idxOperandPairs = rhs.getIdxOperandPairVec();
|
|
83
83
|
return *this;
|
|
84
84
|
}
|
|
85
85
|
inline bool operator==(const AccessPath& rhs) const
|
|
86
86
|
{
|
|
87
87
|
return this->fldIdx == rhs.fldIdx &&
|
|
88
|
-
this->
|
|
88
|
+
this->idxOperandPairs == rhs.idxOperandPairs;
|
|
89
89
|
}
|
|
90
90
|
//@}
|
|
91
91
|
|
|
@@ -99,9 +99,9 @@ public:
|
|
|
99
99
|
{
|
|
100
100
|
fldIdx = idx;
|
|
101
101
|
}
|
|
102
|
-
inline const
|
|
102
|
+
inline const IdxOperandPairs& getIdxOperandPairVec() const
|
|
103
103
|
{
|
|
104
|
-
return
|
|
104
|
+
return idxOperandPairs;
|
|
105
105
|
}
|
|
106
106
|
//@}
|
|
107
107
|
|
|
@@ -146,6 +146,9 @@ public:
|
|
|
146
146
|
return computeAllLocations().intersects(RHS.computeAllLocations());
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/// Return byte offset from the beginning of the structure to the field where it is located for struct type
|
|
150
|
+
u32_t getStructFieldOffset(const SVFVar* idxOperandVar, const SVFStructType* idxOperandType) const;
|
|
151
|
+
|
|
149
152
|
/// Dump location set
|
|
150
153
|
std::string dump() const;
|
|
151
154
|
|
|
@@ -158,8 +161,7 @@ private:
|
|
|
158
161
|
NodeBS computeAllLocations() const;
|
|
159
162
|
|
|
160
163
|
APOffset fldIdx; ///< Accumulated Constant Offsets
|
|
161
|
-
|
|
162
|
-
offsetVarAndGepTypePairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>s
|
|
164
|
+
IdxOperandPairs idxOperandPairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>
|
|
163
165
|
};
|
|
164
166
|
|
|
165
167
|
} // End namespace SVF
|
|
@@ -169,9 +171,9 @@ template <> struct std::hash<SVF::AccessPath>
|
|
|
169
171
|
size_t operator()(const SVF::AccessPath &ap) const
|
|
170
172
|
{
|
|
171
173
|
SVF::Hash<std::pair<SVF::NodeID, SVF::NodeID>> h;
|
|
172
|
-
std::hash<SVF::AccessPath::
|
|
174
|
+
std::hash<SVF::AccessPath::IdxOperandPairs> v;
|
|
173
175
|
return h(std::make_pair(ap.getConstantFieldIdx(),
|
|
174
|
-
v(ap.
|
|
176
|
+
v(ap.getIdxOperandPairVec())));
|
|
175
177
|
}
|
|
176
178
|
};
|
|
177
179
|
|
|
@@ -491,10 +491,9 @@ public:
|
|
|
491
491
|
{
|
|
492
492
|
return ap;
|
|
493
493
|
}
|
|
494
|
-
inline const AccessPath::
|
|
495
|
-
getOffsetVarAndGepTypePairVec() const
|
|
494
|
+
inline const AccessPath::IdxOperandPairs getOffsetVarAndGepTypePairVec() const
|
|
496
495
|
{
|
|
497
|
-
return getAccessPath().
|
|
496
|
+
return getAccessPath().getIdxOperandPairVec();
|
|
498
497
|
}
|
|
499
498
|
/// Return TRUE if this is a constant location set.
|
|
500
499
|
inline bool isConstantOffset() const
|