svf-tools 1.0.1129 → 1.0.1131
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/package.json +1 -1
- package/svf/include/Graphs/CallGraph.h +1 -1
- package/svf/include/SVFIR/SVFIR.h +3 -7
- package/svf/lib/Graphs/CallGraph.cpp +1 -1
- package/svf/lib/MSSA/MemRegion.cpp +1 -1
- package/svf/lib/MSSA/MemSSA.cpp +1 -1
- package/svf/lib/MSSA/SVFGBuilder.cpp +1 -1
- package/svf/lib/MTA/TCT.cpp +1 -1
- package/svf/lib/SABER/SaberCondAllocator.cpp +1 -1
- package/svf/lib/Util/CDGBuilder.cpp +1 -1
- package/svf/lib/Util/CallGraphBuilder.cpp +2 -2
- package/svf/lib/Util/SVFStat.cpp +1 -1
- package/svf/lib/Util/SVFUtil.cpp +2 -2
- package/svf/lib/Util/ThreadAPI.cpp +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1131",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -357,7 +357,7 @@ public:
|
|
|
357
357
|
/// Get call graph node
|
|
358
358
|
//@{
|
|
359
359
|
|
|
360
|
-
const CallGraphNode* getCallGraphNode(const std::string& name);
|
|
360
|
+
const CallGraphNode* getCallGraphNode(const std::string& name) const;
|
|
361
361
|
|
|
362
362
|
inline CallGraphNode* getCallGraphNode(NodeID id) const
|
|
363
363
|
{
|
|
@@ -96,7 +96,7 @@ private:
|
|
|
96
96
|
ICFG* icfg; // ICFG
|
|
97
97
|
CommonCHGraph* chgraph; // class hierarchy graph
|
|
98
98
|
CallSiteSet callSiteSet; /// all the callsites of a program
|
|
99
|
-
CallGraph* callGraph; ///
|
|
99
|
+
CallGraph* callGraph; /// Callgraph with direct calls only; no change allowed after init and use callgraph in PointerAnalysis for indirect calls)
|
|
100
100
|
|
|
101
101
|
static std::unique_ptr<SVFIR> pag; ///< Singleton pattern here to enable instance of SVFIR can only be created once.
|
|
102
102
|
static std::string pagReadFromTxt;
|
|
@@ -176,12 +176,8 @@ public:
|
|
|
176
176
|
return chgraph;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
///
|
|
180
|
-
inline
|
|
181
|
-
{
|
|
182
|
-
callGraph = c;
|
|
183
|
-
}
|
|
184
|
-
inline CallGraph* getCallGraph()
|
|
179
|
+
/// Get CG
|
|
180
|
+
inline const CallGraph* getCallGraph()
|
|
185
181
|
{
|
|
186
182
|
assert(callGraph && "empty CallGraph! Build SVF IR first!");
|
|
187
183
|
return callGraph;
|
|
@@ -364,7 +364,7 @@ void CallGraph::addCallGraphNode(const FunObjVar* fun)
|
|
|
364
364
|
callGraphNodeNum++;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
const CallGraphNode* CallGraph::getCallGraphNode(const std::string& name)
|
|
367
|
+
const CallGraphNode* CallGraph::getCallGraphNode(const std::string& name) const
|
|
368
368
|
{
|
|
369
369
|
for (const auto& item : *this)
|
|
370
370
|
{
|
|
@@ -173,7 +173,7 @@ SVFIR::SVFStmtList& MRGenerator::getPAGEdgesFromInst(const ICFGNode* node)
|
|
|
173
173
|
void MRGenerator::collectModRefForLoadStore()
|
|
174
174
|
{
|
|
175
175
|
|
|
176
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
176
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
177
177
|
for (const auto& item: *svfirCallGraph)
|
|
178
178
|
{
|
|
179
179
|
const FunObjVar& fun = *item.second->getFunction();
|
package/svf/lib/MSSA/MemSSA.cpp
CHANGED
|
@@ -577,7 +577,7 @@ u32_t MemSSA::getBBPhiNum() const
|
|
|
577
577
|
void MemSSA::dumpMSSA(OutStream& Out)
|
|
578
578
|
{
|
|
579
579
|
|
|
580
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
580
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
581
581
|
for (const auto& item: *svfirCallGraph)
|
|
582
582
|
{
|
|
583
583
|
const FunObjVar* fun = item.second->getFunction();
|
|
@@ -100,7 +100,7 @@ std::unique_ptr<MemSSA> SVFGBuilder::buildMSSA(BVDataPTAImpl* pta,
|
|
|
100
100
|
|
|
101
101
|
auto mssa = std::make_unique<MemSSA>(pta, ptrOnlyMSSA);
|
|
102
102
|
|
|
103
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
103
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
104
104
|
for (const auto& item : *svfirCallGraph)
|
|
105
105
|
{
|
|
106
106
|
|
package/svf/lib/MTA/TCT.cpp
CHANGED
|
@@ -186,7 +186,7 @@ void TCT::markRelProcs(const FunObjVar* svffun)
|
|
|
186
186
|
*/
|
|
187
187
|
void TCT::collectEntryFunInCallGraph()
|
|
188
188
|
{
|
|
189
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
189
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
190
190
|
for (const auto& item: *svfirCallGraph)
|
|
191
191
|
{
|
|
192
192
|
const FunObjVar* fun = item.second->getFunction();
|
|
@@ -60,7 +60,7 @@ void SaberCondAllocator::allocate()
|
|
|
60
60
|
{
|
|
61
61
|
DBOUT(DGENERAL, outs() << pasMsg("path condition allocation starts\n"));
|
|
62
62
|
|
|
63
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
63
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
64
64
|
for (const auto& item: *svfirCallGraph)
|
|
65
65
|
{
|
|
66
66
|
const FunObjVar *func = (item.second)->getFunction();
|
|
@@ -122,7 +122,7 @@ s64_t CDGBuilder::getBBSuccessorBranchID(const SVFBasicBlock *BB, const SVFBasic
|
|
|
122
122
|
*/
|
|
123
123
|
void CDGBuilder::buildControlDependence()
|
|
124
124
|
{
|
|
125
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
125
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
126
126
|
for (const auto& item: *svfirCallGraph)
|
|
127
127
|
{
|
|
128
128
|
const FunObjVar *svfFun = (item.second)->getFunction();
|
|
@@ -69,13 +69,13 @@ CallGraph* CallGraphBuilder::buildSVFIRCallGraph(const std::vector<const FunObjV
|
|
|
69
69
|
|
|
70
70
|
CallGraph* CallGraphBuilder::buildPTACallGraph()
|
|
71
71
|
{
|
|
72
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
72
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
73
73
|
return new CallGraph(*svfirCallGraph);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
ThreadCallGraph* CallGraphBuilder::buildThreadCallGraph()
|
|
77
77
|
{
|
|
78
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
78
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
79
79
|
ThreadCallGraph* cg = new ThreadCallGraph(*svfirCallGraph);
|
|
80
80
|
|
|
81
81
|
ThreadAPI* tdAPI = ThreadAPI::getThreadAPI();
|
package/svf/lib/Util/SVFStat.cpp
CHANGED
|
@@ -223,7 +223,7 @@ void SVFStat::branchStat()
|
|
|
223
223
|
{
|
|
224
224
|
u32_t numOfBB_2Succ = 0;
|
|
225
225
|
u32_t numOfBB_3Succ = 0;
|
|
226
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
226
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
227
227
|
for (const auto& item: *svfirCallGraph)
|
|
228
228
|
{
|
|
229
229
|
const FunObjVar* func = item.second->getFunction();
|
package/svf/lib/Util/SVFUtil.cpp
CHANGED
|
@@ -396,7 +396,7 @@ bool SVFUtil::isProgExitCall(const CallICFGNode* cs)
|
|
|
396
396
|
/// Get program entry function from module.
|
|
397
397
|
const FunObjVar* SVFUtil::getProgFunction(const std::string& funName)
|
|
398
398
|
{
|
|
399
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
399
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
400
400
|
for (const auto& item: *svfirCallGraph)
|
|
401
401
|
{
|
|
402
402
|
const CallGraphNode*fun = item.second;
|
|
@@ -409,7 +409,7 @@ const FunObjVar* SVFUtil::getProgFunction(const std::string& funName)
|
|
|
409
409
|
/// Get program entry function from module.
|
|
410
410
|
const FunObjVar* SVFUtil::getProgEntryFunction()
|
|
411
411
|
{
|
|
412
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
412
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
413
413
|
for (const auto& item: *svfirCallGraph)
|
|
414
414
|
{
|
|
415
415
|
const CallGraphNode*fun = item.second;
|
|
@@ -282,7 +282,7 @@ void ThreadAPI::performAPIStat()
|
|
|
282
282
|
|
|
283
283
|
statInit(tdAPIStatMap);
|
|
284
284
|
|
|
285
|
-
CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
285
|
+
const CallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
|
|
286
286
|
for (const auto& item: *svfirCallGraph)
|
|
287
287
|
{
|
|
288
288
|
for (FunObjVar::const_bb_iterator bit = (item.second)->getFunction()->begin(), ebit = (item.second)->getFunction()->end(); bit != ebit; ++bit)
|