svf-tools 1.0.998 → 1.0.999
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/GenericGraph.h +1 -1
- package/svf/lib/Graphs/ICFG.cpp +3 -3
- package/svf/lib/Graphs/SVFG.cpp +3 -3
- package/svf/lib/MTA/TCT.cpp +1 -1
- package/svf/lib/SABER/DoubleFreeChecker.cpp +4 -4
- package/svf/lib/SABER/LeakChecker.cpp +4 -4
- package/svf/lib/Util/SVFUtil.cpp +2 -2
- package/svf/lib/WPA/Andersen.cpp +2 -3
- package/svf-llvm/lib/LLVMUtil.cpp +1 -1
- package/svf-llvm/lib/SVFIRBuilder.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.999",
|
|
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": {
|
package/svf/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -91,7 +91,7 @@ const std::string IntraICFGNode::toString() const
|
|
|
91
91
|
for (const SVFStmt *stmt : getSVFStmts())
|
|
92
92
|
rawstr << "\n" << stmt->toString();
|
|
93
93
|
if(getSVFStmts().empty())
|
|
94
|
-
rawstr << "\n" <<
|
|
94
|
+
rawstr << "\n" << valueOnlyToString();
|
|
95
95
|
return rawstr.str();
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -137,7 +137,7 @@ const std::string CallICFGNode::toString() const
|
|
|
137
137
|
for (const SVFStmt *stmt : getSVFStmts())
|
|
138
138
|
rawstr << "\n" << stmt->toString();
|
|
139
139
|
if(getSVFStmts().empty())
|
|
140
|
-
rawstr << "\n" <<
|
|
140
|
+
rawstr << "\n" << valueOnlyToString();
|
|
141
141
|
return rawstr.str();
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -150,7 +150,7 @@ const std::string RetICFGNode::toString() const
|
|
|
150
150
|
for (const SVFStmt *stmt : getSVFStmts())
|
|
151
151
|
rawstr << "\n" << stmt->toString();
|
|
152
152
|
if(getSVFStmts().empty())
|
|
153
|
-
rawstr << "\n" <<
|
|
153
|
+
rawstr << "\n" << valueOnlyToString();
|
|
154
154
|
return rawstr.str();
|
|
155
155
|
}
|
|
156
156
|
|
package/svf/lib/Graphs/SVFG.cpp
CHANGED
|
@@ -79,7 +79,7 @@ const std::string ActualINSVFGNode::toString() const
|
|
|
79
79
|
{
|
|
80
80
|
std::string str;
|
|
81
81
|
std::stringstream rawstr(str);
|
|
82
|
-
rawstr << "ActualINSVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->
|
|
82
|
+
rawstr << "ActualINSVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->valueOnlyToString() << " {fun: " << getFun()->getName() << "}";
|
|
83
83
|
rawstr << "CSMU(" << getMRVer()->getMR()->getMRID() << "V_" << getMRVer()->getSSAVersion() << ")\n";
|
|
84
84
|
rawstr << getMRVer()->getMR()->dumpStr() << "\n";
|
|
85
85
|
rawstr << "CS[" << getCallSite()->getSourceLoc() << "]";
|
|
@@ -90,7 +90,7 @@ const std::string ActualOUTSVFGNode::toString() const
|
|
|
90
90
|
{
|
|
91
91
|
std::string str;
|
|
92
92
|
std::stringstream rawstr(str);
|
|
93
|
-
rawstr << "ActualOUTSVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->
|
|
93
|
+
rawstr << "ActualOUTSVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->valueOnlyToString() << " {fun: " << getFun()->getName() << "}";
|
|
94
94
|
rawstr << getMRVer()->getMR()->getMRID() << "V_" << getMRVer()->getSSAVersion() <<
|
|
95
95
|
" = CSCHI(MR_" << getMRVer()->getMR()->getMRID() << "V_" << getMRVer()->getSSAVersion() << ")\n";
|
|
96
96
|
rawstr << getMRVer()->getMR()->dumpStr() << "\n";
|
|
@@ -142,7 +142,7 @@ const std::string InterMSSAPHISVFGNode::toString() const
|
|
|
142
142
|
if(isFormalINPHI())
|
|
143
143
|
rawstr << "FormalINPHISVFGNode ID: " << getId() << " {fun: " << getFun()->getName() << "}";
|
|
144
144
|
else
|
|
145
|
-
rawstr << "ActualOUTPHISVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->
|
|
145
|
+
rawstr << "ActualOUTPHISVFGNode ID: " << getId() << " at callsite: " << (getCallSite())->valueOnlyToString() << " {fun: " << getFun()->getName() << "}";
|
|
146
146
|
rawstr << MSSAPHISVFGNode::toString();
|
|
147
147
|
return rawstr.str();
|
|
148
148
|
}
|
package/svf/lib/MTA/TCT.cpp
CHANGED
|
@@ -499,7 +499,7 @@ void TCT::dumpCxt(CallStrCxt& cxt)
|
|
|
499
499
|
for(CallStrCxt::const_iterator it = cxt.begin(), eit = cxt.end(); it!=eit; ++it)
|
|
500
500
|
{
|
|
501
501
|
rawstr << " ' "<< *it << " ' ";
|
|
502
|
-
rawstr << (tcg->getCallSite(*it))->
|
|
502
|
+
rawstr << (tcg->getCallSite(*it))->valueOnlyToString();
|
|
503
503
|
rawstr << " call " << tcg->getCallSite(*it)->getCaller()->getName() << "-->" << tcg->getCalleeOfCallSite(*it)->getName() << ", \n";
|
|
504
504
|
}
|
|
505
505
|
rawstr << " ]";
|
|
@@ -94,14 +94,14 @@ void DoubleFreeChecker::validateSuccessTests(ProgSlice *slice, const SVFFunction
|
|
|
94
94
|
if (success)
|
|
95
95
|
{
|
|
96
96
|
outs() << sucMsg("\t SUCCESS :") << funName << " check <src id:" << source->getId()
|
|
97
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
97
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
98
98
|
<< cs->getSourceLoc() << ")\n";
|
|
99
99
|
outs() << "\t\t double free path: \n" << slice->evalFinalCond() << "\n";
|
|
100
100
|
}
|
|
101
101
|
else
|
|
102
102
|
{
|
|
103
103
|
SVFUtil::errs() << errMsg("\t FAILURE :") << funName << " check <src id:" << source->getId()
|
|
104
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
104
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
105
105
|
<< cs->getSourceLoc() << ")\n";
|
|
106
106
|
SVFUtil::errs() << "\t\t double free path: \n" << slice->evalFinalCond() << "\n";
|
|
107
107
|
assert(false && "test case failed!");
|
|
@@ -140,7 +140,7 @@ void DoubleFreeChecker::validateExpectedFailureTests(ProgSlice *slice, const SVF
|
|
|
140
140
|
if (expectedFailure)
|
|
141
141
|
{
|
|
142
142
|
outs() << sucMsg("\t EXPECTED-FAILURE :") << funName << " check <src id:" << source->getId()
|
|
143
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
143
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
144
144
|
<< cs->getSourceLoc() << ")\n";
|
|
145
145
|
outs() << "\t\t double free path: \n" << slice->evalFinalCond() << "\n";
|
|
146
146
|
}
|
|
@@ -148,7 +148,7 @@ void DoubleFreeChecker::validateExpectedFailureTests(ProgSlice *slice, const SVF
|
|
|
148
148
|
{
|
|
149
149
|
SVFUtil::errs() << errMsg("\t UNEXPECTED FAILURE :") << funName
|
|
150
150
|
<< " check <src id:" << source->getId()
|
|
151
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
151
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
152
152
|
<< cs->getSourceLoc() << ")\n";
|
|
153
153
|
SVFUtil::errs() << "\t\t double free path: \n" << slice->evalFinalCond() << "\n";
|
|
154
154
|
assert(false && "test case failed!");
|
|
@@ -231,13 +231,13 @@ void LeakChecker::validateSuccessTests(const SVFGNode* source, const SVFFunction
|
|
|
231
231
|
if (success)
|
|
232
232
|
{
|
|
233
233
|
outs() << sucMsg("\t SUCCESS :") << funName << " check <src id:" << source->getId()
|
|
234
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
234
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
235
235
|
<< cs->getSourceLoc() << ")\n";
|
|
236
236
|
}
|
|
237
237
|
else
|
|
238
238
|
{
|
|
239
239
|
SVFUtil::errs() << errMsg("\t FAILURE :") << funName << " check <src id:" << source->getId()
|
|
240
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
240
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
241
241
|
<< cs->getSourceLoc() << ")\n";
|
|
242
242
|
assert(false && "test case failed!");
|
|
243
243
|
}
|
|
@@ -281,14 +281,14 @@ void LeakChecker::validateExpectedFailureTests(const SVFGNode* source, const SVF
|
|
|
281
281
|
if (expectedFailure)
|
|
282
282
|
{
|
|
283
283
|
outs() << sucMsg("\t EXPECTED-FAILURE :") << funName << " check <src id:" << source->getId()
|
|
284
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
284
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
285
285
|
<< cs->getSourceLoc() << ")\n";
|
|
286
286
|
}
|
|
287
287
|
else
|
|
288
288
|
{
|
|
289
289
|
SVFUtil::errs() << errMsg("\t UNEXPECTED FAILURE :") << funName
|
|
290
290
|
<< " check <src id:" << source->getId()
|
|
291
|
-
<< ", cs id:" << (getSrcCSID(source))->
|
|
291
|
+
<< ", cs id:" << (getSrcCSID(source))->valueOnlyToString() << "> at ("
|
|
292
292
|
<< cs->getSourceLoc() << ")\n";
|
|
293
293
|
assert(false && "test case failed!");
|
|
294
294
|
}
|
package/svf/lib/Util/SVFUtil.cpp
CHANGED
|
@@ -399,8 +399,8 @@ bool SVFUtil::isProgExitCall(const CallICFGNode* cs)
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
__attribute__((weak))
|
|
402
|
-
const std::string SVFBaseNode::
|
|
402
|
+
const std::string SVFBaseNode::valueOnlyToString() const
|
|
403
403
|
{
|
|
404
|
-
assert("SVFBaseNode::
|
|
404
|
+
assert("SVFBaseNode::valueOnlyToString should be implemented or supported by fronted" && false);
|
|
405
405
|
abort();
|
|
406
406
|
}
|
package/svf/lib/WPA/Andersen.cpp
CHANGED
|
@@ -247,7 +247,7 @@ void AndersenBase::connectCaller2ForkedFunParams(const CallICFGNode* cs, const S
|
|
|
247
247
|
assert(F);
|
|
248
248
|
|
|
249
249
|
DBOUT(DAndersen, outs() << "connect parameters from indirect forksite "
|
|
250
|
-
<< cs
|
|
250
|
+
<< cs->valueOnlyToString() << " to forked function "
|
|
251
251
|
<< *F << "\n");
|
|
252
252
|
|
|
253
253
|
ThreadCallGraph *tdCallGraph = SVFUtil::dyn_cast<ThreadCallGraph>(callgraph);
|
|
@@ -276,8 +276,7 @@ void AndersenBase::connectCaller2CalleeParams(const CallICFGNode* cs,
|
|
|
276
276
|
{
|
|
277
277
|
assert(F);
|
|
278
278
|
|
|
279
|
-
DBOUT(DAndersen, outs() << "connect parameters from indirect callsite " <<
|
|
280
|
-
cs.getInstruction()->toString() << " to callee " << *F << "\n");
|
|
279
|
+
DBOUT(DAndersen, outs() << "connect parameters from indirect callsite " << cs->valueOnlyToString() << " to callee " << *F << "\n");
|
|
281
280
|
|
|
282
281
|
const CallICFGNode* callBlockNode = cs;
|
|
283
282
|
const RetICFGNode* retBlockNode = cs->getRetICFGNode();
|
|
@@ -856,7 +856,7 @@ void SVFIRBuilder::visitCallSite(CallBase* cs)
|
|
|
856
856
|
return;
|
|
857
857
|
|
|
858
858
|
DBOUT(DPAGBuild,
|
|
859
|
-
outs() << "process callsite " << svfcall->
|
|
859
|
+
outs() << "process callsite " << svfcall->valueOnlyToString() << "\n");
|
|
860
860
|
|
|
861
861
|
|
|
862
862
|
CallICFGNode* callBlockNode = llvmModuleSet()->getCallICFGNode(cs);
|