svf-lib 1.0.2177 → 1.0.2178
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/bin/ae +0 -0
- package/SVF-linux/Release-build/bin/cfl +0 -0
- package/SVF-linux/Release-build/bin/dvf +0 -0
- package/SVF-linux/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux/Release-build/bin/mta +0 -0
- package/SVF-linux/Release-build/bin/saber +0 -0
- package/SVF-linux/Release-build/bin/svf-ex +0 -0
- package/SVF-linux/Release-build/bin/wpa +0 -0
- package/SVF-linux/Release-build/include/Graphs/VFGNode.h +8 -6
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFIRBuilder.h +7 -8
- package/SVF-linux/Release-build/include/SVFIR/SVFStatements.h +8 -12
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -82,7 +82,7 @@ public:
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/// Return the corresponding LLVM value, if possible, nullptr otherwise.
|
|
85
|
-
virtual const
|
|
85
|
+
virtual const SVFVar* getValue() const
|
|
86
86
|
{
|
|
87
87
|
return nullptr;
|
|
88
88
|
}
|
|
@@ -190,7 +190,7 @@ public:
|
|
|
190
190
|
}
|
|
191
191
|
//@}
|
|
192
192
|
|
|
193
|
-
const
|
|
193
|
+
const SVFVar* getValue() const override;
|
|
194
194
|
const std::string toString() const override;
|
|
195
195
|
};
|
|
196
196
|
|
|
@@ -401,7 +401,9 @@ public:
|
|
|
401
401
|
|
|
402
402
|
const NodeBS getDefSVFVars() const override;
|
|
403
403
|
|
|
404
|
-
const
|
|
404
|
+
const SVFVar* getValue() const override;
|
|
405
|
+
|
|
406
|
+
|
|
405
407
|
const std::string toString() const override;
|
|
406
408
|
};
|
|
407
409
|
|
|
@@ -476,7 +478,7 @@ public:
|
|
|
476
478
|
|
|
477
479
|
const NodeBS getDefSVFVars() const override;
|
|
478
480
|
|
|
479
|
-
const
|
|
481
|
+
const SVFVar* getValue() const override;
|
|
480
482
|
const std::string toString() const override;
|
|
481
483
|
};
|
|
482
484
|
|
|
@@ -736,7 +738,7 @@ public:
|
|
|
736
738
|
|
|
737
739
|
const NodeBS getDefSVFVars() const override;
|
|
738
740
|
|
|
739
|
-
const
|
|
741
|
+
const SVFVar* getValue() const override;
|
|
740
742
|
const std::string toString() const override;
|
|
741
743
|
};
|
|
742
744
|
|
|
@@ -879,7 +881,7 @@ public:
|
|
|
879
881
|
}
|
|
880
882
|
//@}
|
|
881
883
|
|
|
882
|
-
const
|
|
884
|
+
const SVFVar* getValue() const override;
|
|
883
885
|
const std::string toString() const override;
|
|
884
886
|
};
|
|
885
887
|
|
|
@@ -307,8 +307,7 @@ protected:
|
|
|
307
307
|
AddrStmt* edge = addAddrEdge(src, dst);
|
|
308
308
|
if (inst.getArraySize())
|
|
309
309
|
{
|
|
310
|
-
|
|
311
|
-
edge->addArrSize(arrSz);
|
|
310
|
+
edge->addArrSize(pag->getGNode(getValueNode(inst.getArraySize())));
|
|
312
311
|
}
|
|
313
312
|
return edge;
|
|
314
313
|
}
|
|
@@ -334,8 +333,7 @@ protected:
|
|
|
334
333
|
if (cs->arg_size() > 0)
|
|
335
334
|
{
|
|
336
335
|
const llvm::Value* val = cs->getArgOperand(0);
|
|
337
|
-
|
|
338
|
-
edge->addArrSize(svfval);
|
|
336
|
+
edge->addArrSize(pag->getGNode(getValueNode(val)));
|
|
339
337
|
}
|
|
340
338
|
}
|
|
341
339
|
// Check if the function called is 'calloc' and process its arguments.
|
|
@@ -344,8 +342,10 @@ protected:
|
|
|
344
342
|
{
|
|
345
343
|
if (cs->arg_size() > 1)
|
|
346
344
|
{
|
|
347
|
-
edge->addArrSize(
|
|
348
|
-
|
|
345
|
+
edge->addArrSize(
|
|
346
|
+
pag->getGNode(getValueNode(cs->getArgOperand(0))));
|
|
347
|
+
edge->addArrSize(
|
|
348
|
+
pag->getGNode(getValueNode(cs->getArgOperand(1))));
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
else
|
|
@@ -353,8 +353,7 @@ protected:
|
|
|
353
353
|
if (cs->arg_size() > 0)
|
|
354
354
|
{
|
|
355
355
|
const llvm::Value* val = cs->getArgOperand(0);
|
|
356
|
-
|
|
357
|
-
edge->addArrSize(svfval);
|
|
356
|
+
edge->addArrSize(pag->getGNode(getValueNode(val)));
|
|
358
357
|
}
|
|
359
358
|
}
|
|
360
359
|
return edge;
|
|
@@ -78,7 +78,7 @@ public:
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
private:
|
|
81
|
-
const
|
|
81
|
+
const SVFVar* value; ///< LLVM value
|
|
82
82
|
const SVFBasicBlock* basicBlock; ///< LLVM BasicBlock
|
|
83
83
|
ICFGNode* icfgNode; ///< ICFGNode
|
|
84
84
|
EdgeID edgeId; ///< Edge ID
|
|
@@ -134,20 +134,16 @@ public:
|
|
|
134
134
|
|
|
135
135
|
/// Get/set methods for llvm instruction
|
|
136
136
|
//@{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (const SVFInstruction* i = SVFUtil::dyn_cast<SVFInstruction>(value))
|
|
140
|
-
return i;
|
|
141
|
-
return nullptr;
|
|
142
|
-
}
|
|
143
|
-
inline void setValue(const SVFValue* val)
|
|
137
|
+
|
|
138
|
+
inline void setValue(const SVFVar* val)
|
|
144
139
|
{
|
|
145
140
|
value = val;
|
|
146
141
|
}
|
|
147
|
-
inline const
|
|
142
|
+
inline const SVFVar* getValue() const
|
|
148
143
|
{
|
|
149
144
|
return value;
|
|
150
145
|
}
|
|
146
|
+
|
|
151
147
|
inline void setBB(const SVFBasicBlock* bb)
|
|
152
148
|
{
|
|
153
149
|
basicBlock = bb;
|
|
@@ -321,7 +317,7 @@ private:
|
|
|
321
317
|
AddrStmt(const AddrStmt&); ///< place holder
|
|
322
318
|
void operator=(const AddrStmt&); ///< place holder
|
|
323
319
|
|
|
324
|
-
std::vector<
|
|
320
|
+
std::vector<SVFVar*> arrSize; ///< Array size of the allocated memory
|
|
325
321
|
|
|
326
322
|
public:
|
|
327
323
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
@@ -345,13 +341,13 @@ public:
|
|
|
345
341
|
|
|
346
342
|
virtual const std::string toString() const override;
|
|
347
343
|
|
|
348
|
-
inline void addArrSize(
|
|
344
|
+
inline void addArrSize(SVFVar* size) //TODO:addSizeVar
|
|
349
345
|
{
|
|
350
346
|
arrSize.push_back(size);
|
|
351
347
|
}
|
|
352
348
|
|
|
353
349
|
///< get array size of the allocated memory
|
|
354
|
-
inline const std::vector<
|
|
350
|
+
inline const std::vector<SVFVar*>& getArrSize() const //TODO:getSizeVars
|
|
355
351
|
{
|
|
356
352
|
return arrSize;
|
|
357
353
|
}
|
|
Binary file
|
|
Binary file
|