svf-tools 1.0.366 → 1.0.367
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-doxygen/html/html/ConsG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +9 -6
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +32 -28
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +20 -16
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +17 -15
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +105 -97
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +6 -6
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/VFG_8h_source.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +30 -30
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallPE-members.html +24 -22
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +91 -27
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +29 -29
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +23 -23
- package/SVF-doxygen/html/html/classSVF_1_1RetPE-members.html +23 -21
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +93 -27
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +61 -37
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +123 -86
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt.html +21 -21
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE-members.html +42 -41
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +28 -19
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE-members.html +42 -41
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +27 -19
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +20 -20
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +16 -16
- package/SVF-doxygen/html/html/functions_a.html +8 -8
- package/SVF-doxygen/html/html/functions_c.html +29 -23
- package/SVF-doxygen/html/html/functions_e.html +6 -2
- package/SVF-doxygen/html/html/functions_f.html +3 -3
- package/SVF-doxygen/html/html/functions_func.html +8 -8
- package/SVF-doxygen/html/html/functions_func_c.html +1 -1
- package/SVF-doxygen/html/html/functions_func_g.html +10 -8
- package/SVF-doxygen/html/html/functions_func_r.html +1 -1
- package/SVF-doxygen/html/html/functions_g.html +14 -12
- package/SVF-doxygen/html/html/functions_i.html +11 -13
- package/SVF-doxygen/html/html/functions_l.html +3 -3
- package/SVF-doxygen/html/html/functions_n.html +3 -3
- package/SVF-doxygen/html/html/functions_o.html +11 -11
- package/SVF-doxygen/html/html/functions_p.html +12 -12
- package/SVF-doxygen/html/html/functions_s.html +9 -9
- package/SVF-doxygen/html/html/functions_t.html +4 -4
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars_c.html +4 -0
- package/SVF-doxygen/html/html/functions_vars_e.html +4 -0
- package/SVF-doxygen/html/html/functions_vars_i.html +1 -3
- package/SVF-doxygen/html/html/search/all_1.js +8 -8
- package/SVF-doxygen/html/html/search/all_10.js +7 -7
- package/SVF-doxygen/html/html/search/all_12.js +1 -1
- package/SVF-doxygen/html/html/search/all_13.js +4 -4
- package/SVF-doxygen/html/html/search/all_14.js +7 -7
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +2 -2
- package/SVF-doxygen/html/html/search/all_3.js +2 -2
- package/SVF-doxygen/html/html/search/all_5.js +2 -2
- package/SVF-doxygen/html/html/search/all_6.js +1 -1
- package/SVF-doxygen/html/html/search/all_7.js +2 -2
- package/SVF-doxygen/html/html/search/all_9.js +2 -2
- package/SVF-doxygen/html/html/search/all_c.js +2 -2
- package/SVF-doxygen/html/html/search/all_e.js +5 -5
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +8 -8
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_11.js +2 -2
- package/SVF-doxygen/html/html/search/functions_2.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +2 -2
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/variables_14.js +3 -3
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_3.js +1 -0
- package/SVF-doxygen/html/html/search/variables_5.js +2 -1
- package/SVF-doxygen/html/html/search/variables_9.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +3 -3
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +1 -1
- package/include/MemoryModel/SVFIR.h +4 -4
- package/include/MemoryModel/SVFStatements.h +24 -14
- package/include/SVF-FE/SVFIRBuilder.h +8 -8
- package/lib/MemoryModel/PAGBuilderFromFile.cpp +2 -2
- package/lib/MemoryModel/SVFIR.cpp +8 -8
- package/lib/SVF-FE/SVFIRBuilder.cpp +11 -6
- package/package.json +1 -1
|
@@ -266,7 +266,7 @@ template<class EdgeIter > </div>
|
|
|
266
266
|
</div><div class="memdoc">
|
|
267
267
|
|
|
268
268
|
<p class="definition">Definition at line <a class="el" href="IRGraph_8cpp_source.html#l00268">268</a> of file <a class="el" href="IRGraph_8cpp_source.html">IRGraph.cpp</a>.</p>
|
|
269
|
-
<div class="fragment"><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  {</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1CallPE.html">CallPE</a>* calledge = SVFUtil::dyn_cast<CallPE>(edge))</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  {</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= calledge->getCallSite()->getCallSite();</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1RetPE.html">RetPE</a>* retedge = SVFUtil::dyn_cast<RetPE>(edge))</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= retedge->getCallSite()->getCallSite();</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  }</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div><div class="ttc" id="classSVF_1_1RetPE_html"><div class="ttname"><a href="classSVF_1_1RetPE.html">SVF::RetPE</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#
|
|
269
|
+
<div class="fragment"><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  {</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1CallPE.html">CallPE</a>* calledge = SVFUtil::dyn_cast<CallPE>(edge))</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  {</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= calledge->getCallSite()->getCallSite();</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1RetPE.html">RetPE</a>* retedge = SVFUtil::dyn_cast<RetPE>(edge))</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= retedge->getCallSite()->getCallSite();</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  }</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div><div class="ttc" id="classSVF_1_1RetPE_html"><div class="ttname"><a href="classSVF_1_1RetPE.html">SVF::RetPE</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00534">SVFStatements.h:534</a></div></div>
|
|
270
270
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
271
271
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a28c0ede7e4765d2a686fc8ae0f5641a4"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVF::SVFUtil::getSourceLoc</a></div><div class="ttdeci">std::string getSourceLoc(const Value *val)</div><div class="ttdoc">Return source code including line number and file name from debug information. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00269">SVFUtil.cpp:269</a></div></div>
|
|
272
272
|
<div class="ttc" id="classSVF_1_1CallPE_html"><div class="ttname"><a href="classSVF_1_1CallPE.html">SVF::CallPE</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00477">SVFStatements.h:477</a></div></div>
|
|
@@ -645,9 +645,9 @@ private:
|
|
|
645
645
|
/// Add Store edge
|
|
646
646
|
StoreStmt* addStoreStmt(NodeID src, NodeID dst, const IntraICFGNode* val);
|
|
647
647
|
/// Add Call edge
|
|
648
|
-
CallPE* addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs);
|
|
648
|
+
CallPE* addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry);
|
|
649
649
|
/// Add Return edge
|
|
650
|
-
RetPE* addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs);
|
|
650
|
+
RetPE* addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit);
|
|
651
651
|
/// Add Gep edge
|
|
652
652
|
GepStmt* addGepStmt(NodeID src, NodeID dst, const LocationSet& ls, bool constGep);
|
|
653
653
|
/// Add Offset(Gep) edge
|
|
@@ -655,9 +655,9 @@ private:
|
|
|
655
655
|
/// Add Variant(Gep) edge
|
|
656
656
|
GepStmt* addVariantGepStmt(NodeID src, NodeID dst, const LocationSet& ls);
|
|
657
657
|
/// Add Thread fork edge for parameter passing
|
|
658
|
-
TDForkPE* addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs);
|
|
658
|
+
TDForkPE* addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry);
|
|
659
659
|
/// Add Thread join edge for parameter passing
|
|
660
|
-
TDJoinPE* addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs);
|
|
660
|
+
TDJoinPE* addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit);
|
|
661
661
|
//@}
|
|
662
662
|
|
|
663
663
|
/// Set a pointer points-to black hole (e.g. int2ptr)
|
|
@@ -481,7 +481,8 @@ private:
|
|
|
481
481
|
CallPE(const CallPE &); ///< place holder
|
|
482
482
|
void operator=(const CallPE &); ///< place holder
|
|
483
483
|
|
|
484
|
-
const CallICFGNode*
|
|
484
|
+
const CallICFGNode* call; /// the callsite statement calling from
|
|
485
|
+
const FunEntryICFGNode* entry; /// the function exit statement calling to
|
|
485
486
|
public:
|
|
486
487
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
487
488
|
//@{
|
|
@@ -502,8 +503,8 @@ public:
|
|
|
502
503
|
//@}
|
|
503
504
|
|
|
504
505
|
/// constructor
|
|
505
|
-
CallPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, GEdgeKind k = SVFStmt::Call) :
|
|
506
|
-
AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)),
|
|
506
|
+
CallPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunEntryICFGNode* e, GEdgeKind k = SVFStmt::Call) :
|
|
507
|
+
AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)), call(i), entry(e)
|
|
507
508
|
{
|
|
508
509
|
}
|
|
509
510
|
|
|
@@ -511,11 +512,15 @@ public:
|
|
|
511
512
|
//@{
|
|
512
513
|
inline const CallICFGNode* getCallInst() const
|
|
513
514
|
{
|
|
514
|
-
return
|
|
515
|
+
return call;
|
|
515
516
|
}
|
|
516
517
|
inline const CallICFGNode* getCallSite() const
|
|
517
518
|
{
|
|
518
|
-
return
|
|
519
|
+
return call;
|
|
520
|
+
}
|
|
521
|
+
inline const FunEntryICFGNode* getFunEntryICFGNode() const
|
|
522
|
+
{
|
|
523
|
+
return entry;
|
|
519
524
|
}
|
|
520
525
|
//@}
|
|
521
526
|
|
|
@@ -533,7 +538,8 @@ private:
|
|
|
533
538
|
RetPE(const RetPE &); ///< place holder
|
|
534
539
|
void operator=(const RetPE &); ///< place holder
|
|
535
540
|
|
|
536
|
-
const CallICFGNode*
|
|
541
|
+
const CallICFGNode* call; /// the callsite statement returning to
|
|
542
|
+
const FunExitICFGNode* exit; /// the function exit statement returned from
|
|
537
543
|
public:
|
|
538
544
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
539
545
|
//@{
|
|
@@ -554,8 +560,8 @@ public:
|
|
|
554
560
|
//@}
|
|
555
561
|
|
|
556
562
|
/// constructor
|
|
557
|
-
RetPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, GEdgeKind k = SVFStmt::Ret) :
|
|
558
|
-
AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)),
|
|
563
|
+
RetPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunExitICFGNode* e, GEdgeKind k = SVFStmt::Ret) :
|
|
564
|
+
AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)), call(i), exit(e)
|
|
559
565
|
{
|
|
560
566
|
}
|
|
561
567
|
|
|
@@ -563,11 +569,15 @@ public:
|
|
|
563
569
|
//@{
|
|
564
570
|
inline const CallICFGNode* getCallInst() const
|
|
565
571
|
{
|
|
566
|
-
return
|
|
572
|
+
return call;
|
|
567
573
|
}
|
|
568
574
|
inline const CallICFGNode* getCallSite() const
|
|
569
575
|
{
|
|
570
|
-
return
|
|
576
|
+
return call;
|
|
577
|
+
}
|
|
578
|
+
inline const FunExitICFGNode* getFunExitICFGNode() const
|
|
579
|
+
{
|
|
580
|
+
return exit;
|
|
571
581
|
}
|
|
572
582
|
//@}
|
|
573
583
|
|
|
@@ -1022,8 +1032,8 @@ public:
|
|
|
1022
1032
|
//@}
|
|
1023
1033
|
|
|
1024
1034
|
/// constructor
|
|
1025
|
-
TDForkPE(SVFVar* s, SVFVar* d, const CallICFGNode* i) :
|
|
1026
|
-
CallPE(s,d,i,SVFStmt::ThreadFork)
|
|
1035
|
+
TDForkPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunEntryICFGNode* entry) :
|
|
1036
|
+
CallPE(s,d,i,entry,SVFStmt::ThreadFork)
|
|
1027
1037
|
{
|
|
1028
1038
|
}
|
|
1029
1039
|
|
|
@@ -1060,8 +1070,8 @@ public:
|
|
|
1060
1070
|
//@}
|
|
1061
1071
|
|
|
1062
1072
|
/// Constructor
|
|
1063
|
-
TDJoinPE(SVFVar* s, SVFVar* d, const CallICFGNode* i) :
|
|
1064
|
-
RetPE(s,d,i,SVFStmt::ThreadJoin)
|
|
1073
|
+
TDJoinPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunExitICFGNode* e) :
|
|
1074
|
+
RetPE(s,d,i,e, SVFStmt::ThreadJoin)
|
|
1065
1075
|
{
|
|
1066
1076
|
}
|
|
1067
1077
|
|
|
@@ -366,16 +366,16 @@ public:
|
|
|
366
366
|
return edge;
|
|
367
367
|
}
|
|
368
368
|
/// Add Call edge
|
|
369
|
-
inline CallPE* addCallEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
369
|
+
inline CallPE* addCallEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
370
370
|
{
|
|
371
|
-
CallPE *edge = pag->addCallPE(src, dst, cs);
|
|
371
|
+
CallPE *edge = pag->addCallPE(src, dst, cs, entry);
|
|
372
372
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
373
373
|
return edge;
|
|
374
374
|
}
|
|
375
375
|
/// Add Return edge
|
|
376
|
-
inline RetPE* addRetEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
376
|
+
inline RetPE* addRetEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
377
377
|
{
|
|
378
|
-
RetPE *edge = pag->addRetPE(src, dst, cs);
|
|
378
|
+
RetPE *edge = pag->addRetPE(src, dst, cs, exit);
|
|
379
379
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
380
380
|
return edge;
|
|
381
381
|
}
|
|
@@ -401,16 +401,16 @@ public:
|
|
|
401
401
|
return edge;
|
|
402
402
|
}
|
|
403
403
|
/// Add Thread fork edge for parameter passing
|
|
404
|
-
inline TDForkPE* addThreadForkEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
404
|
+
inline TDForkPE* addThreadForkEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
405
405
|
{
|
|
406
|
-
TDForkPE *edge = pag->addThreadForkPE(src, dst, cs);
|
|
406
|
+
TDForkPE *edge = pag->addThreadForkPE(src, dst, cs, entry);
|
|
407
407
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
408
408
|
return edge;
|
|
409
409
|
}
|
|
410
410
|
/// Add Thread join edge for parameter passing
|
|
411
|
-
inline TDJoinPE* addThreadJoinEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
411
|
+
inline TDJoinPE* addThreadJoinEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
412
412
|
{
|
|
413
|
-
TDJoinPE *edge = pag->addThreadJoinPE(src, dst, cs);
|
|
413
|
+
TDJoinPE *edge = pag->addThreadJoinPE(src, dst, cs, exit);
|
|
414
414
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
415
415
|
return edge;
|
|
416
416
|
}
|
|
@@ -173,9 +173,9 @@ void PAGBuilderFromFile::addEdge(NodeID srcID, NodeID dstID,
|
|
|
173
173
|
else if (edge == "variant-gep")
|
|
174
174
|
pag->addVariantGepStmt(srcID, dstID, LocationSet(offsetOrCSId));
|
|
175
175
|
else if (edge == "call")
|
|
176
|
-
pag->addEdge(srcNode, dstNode, new CallPE(srcNode, dstNode, nullptr));
|
|
176
|
+
pag->addEdge(srcNode, dstNode, new CallPE(srcNode, dstNode, nullptr, nullptr));
|
|
177
177
|
else if (edge == "ret")
|
|
178
|
-
pag->addEdge(srcNode, dstNode, new RetPE(srcNode, dstNode, nullptr));
|
|
178
|
+
pag->addEdge(srcNode, dstNode, new RetPE(srcNode, dstNode, nullptr,nullptr));
|
|
179
179
|
else if (edge == "cmp")
|
|
180
180
|
pag->addCmpStmt(srcID, dstID, dstID, dstID);
|
|
181
181
|
else if (edge == "binary-op")
|
|
@@ -240,7 +240,7 @@ StoreStmt* SVFIR::addStoreStmt(NodeID src, NodeID dst, const IntraICFGNode* curV
|
|
|
240
240
|
/*!
|
|
241
241
|
* Add Call edge
|
|
242
242
|
*/
|
|
243
|
-
CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
243
|
+
CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
244
244
|
{
|
|
245
245
|
SVFVar* srcNode = getGNode(src);
|
|
246
246
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -248,7 +248,7 @@ CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
248
248
|
return SVFUtil::cast<CallPE>(edge);
|
|
249
249
|
else
|
|
250
250
|
{
|
|
251
|
-
CallPE* callPE = new CallPE(srcNode, dstNode, cs);
|
|
251
|
+
CallPE* callPE = new CallPE(srcNode, dstNode, cs,entry);
|
|
252
252
|
addToStmt2TypeMap(callPE);
|
|
253
253
|
addEdge(srcNode,dstNode, callPE);
|
|
254
254
|
return callPE;
|
|
@@ -258,7 +258,7 @@ CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
258
258
|
/*!
|
|
259
259
|
* Add Return edge
|
|
260
260
|
*/
|
|
261
|
-
RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
261
|
+
RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
262
262
|
{
|
|
263
263
|
SVFVar* srcNode = getGNode(src);
|
|
264
264
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -266,7 +266,7 @@ RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
266
266
|
return SVFUtil::cast<RetPE>(edge);
|
|
267
267
|
else
|
|
268
268
|
{
|
|
269
|
-
RetPE* retPE = new RetPE(srcNode, dstNode, cs);
|
|
269
|
+
RetPE* retPE = new RetPE(srcNode, dstNode, cs, exit);
|
|
270
270
|
addToStmt2TypeMap(retPE);
|
|
271
271
|
addEdge(srcNode,dstNode, retPE);
|
|
272
272
|
return retPE;
|
|
@@ -287,7 +287,7 @@ SVFStmt* SVFIR::addBlackHoleAddrStmt(NodeID node)
|
|
|
287
287
|
/*!
|
|
288
288
|
* Add Thread fork edge for parameter passing from a spawner to its spawnees
|
|
289
289
|
*/
|
|
290
|
-
TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
290
|
+
TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
291
291
|
{
|
|
292
292
|
SVFVar* srcNode = getGNode(src);
|
|
293
293
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -295,7 +295,7 @@ TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
295
295
|
return SVFUtil::cast<TDForkPE>(edge);
|
|
296
296
|
else
|
|
297
297
|
{
|
|
298
|
-
TDForkPE* forkPE = new TDForkPE(srcNode, dstNode, cs);
|
|
298
|
+
TDForkPE* forkPE = new TDForkPE(srcNode, dstNode, cs, entry);
|
|
299
299
|
addToStmt2TypeMap(forkPE);
|
|
300
300
|
addEdge(srcNode,dstNode, forkPE);
|
|
301
301
|
return forkPE;
|
|
@@ -305,7 +305,7 @@ TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
305
305
|
/*!
|
|
306
306
|
* Add Thread fork edge for parameter passing from a spawnee back to its spawners
|
|
307
307
|
*/
|
|
308
|
-
TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
308
|
+
TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
309
309
|
{
|
|
310
310
|
SVFVar* srcNode = getGNode(src);
|
|
311
311
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -313,7 +313,7 @@ TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
313
313
|
return SVFUtil::cast<TDJoinPE>(edge);
|
|
314
314
|
else
|
|
315
315
|
{
|
|
316
|
-
TDJoinPE* joinPE = new TDJoinPE(srcNode, dstNode, cs);
|
|
316
|
+
TDJoinPE* joinPE = new TDJoinPE(srcNode, dstNode, cs, exit);
|
|
317
317
|
addToStmt2TypeMap(joinPE);
|
|
318
318
|
addEdge(srcNode,dstNode, joinPE);
|
|
319
319
|
return joinPE;
|
|
@@ -961,8 +961,9 @@ void SVFIRBuilder::handleDirectCall(CallSite cs, const SVFFunction *F)
|
|
|
961
961
|
if (!cs.getType()->isVoidTy())
|
|
962
962
|
{
|
|
963
963
|
NodeID srcret = getReturnNode(F);
|
|
964
|
-
CallICFGNode*
|
|
965
|
-
|
|
964
|
+
CallICFGNode* callICFGNode = pag->getICFG()->getCallICFGNode(cs.getInstruction());
|
|
965
|
+
FunExitICFGNode* exitICFGNode = pag->getICFG()->getFunExitICFGNode(F);
|
|
966
|
+
addRetEdge(srcret, dstrec,callICFGNode, exitICFGNode);
|
|
966
967
|
}
|
|
967
968
|
//Iterators for the actual and formal parameters
|
|
968
969
|
CallSite::arg_iterator itA = cs.arg_begin(), ieA = cs.arg_end();
|
|
@@ -984,7 +985,8 @@ void SVFIRBuilder::handleDirectCall(CallSite cs, const SVFFunction *F)
|
|
|
984
985
|
NodeID dstFA = getValueNode(FA);
|
|
985
986
|
NodeID srcAA = getValueNode(AA);
|
|
986
987
|
CallICFGNode* icfgNode = pag->getICFG()->getCallICFGNode(cs.getInstruction());
|
|
987
|
-
|
|
988
|
+
FunEntryICFGNode* entry = pag->getICFG()->getFunEntryICFGNode(F);
|
|
989
|
+
addCallEdge(srcAA, dstFA, icfgNode, entry);
|
|
988
990
|
}
|
|
989
991
|
//Any remaining actual args must be varargs.
|
|
990
992
|
if (F->getLLVMFun()->isVarArg())
|
|
@@ -996,7 +998,8 @@ void SVFIRBuilder::handleDirectCall(CallSite cs, const SVFFunction *F)
|
|
|
996
998
|
Value *AA = *itA;
|
|
997
999
|
NodeID vnAA = getValueNode(AA);
|
|
998
1000
|
CallICFGNode* icfgNode = pag->getICFG()->getCallICFGNode(cs.getInstruction());
|
|
999
|
-
|
|
1001
|
+
FunEntryICFGNode* entry = pag->getICFG()->getFunEntryICFGNode(F);
|
|
1002
|
+
addCallEdge(vnAA,vaF, icfgNode,entry);
|
|
1000
1003
|
}
|
|
1001
1004
|
}
|
|
1002
1005
|
if(itA != ieA)
|
|
@@ -1479,7 +1482,8 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1479
1482
|
if(SVFUtil::isa<PointerType>(actualParm->getType()) && SVFUtil::isa<PointerType>(formalParm->getType()) )
|
|
1480
1483
|
{
|
|
1481
1484
|
CallICFGNode* icfgNode = pag->getICFG()->getCallICFGNode(inst);
|
|
1482
|
-
|
|
1485
|
+
FunEntryICFGNode* entry = pag->getICFG()->getFunEntryICFGNode(LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(forkedFun));
|
|
1486
|
+
addThreadForkEdge(pag->getValueNode(actualParm), pag->getValueNode(formalParm),icfgNode, entry);
|
|
1483
1487
|
}
|
|
1484
1488
|
}
|
|
1485
1489
|
}
|
|
@@ -1508,7 +1512,8 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1508
1512
|
if(SVFUtil::isa<PointerType>(actualParm->getType()) && SVFUtil::isa<PointerType>(formalParm->getType()) )
|
|
1509
1513
|
{
|
|
1510
1514
|
CallICFGNode* icfgNode = pag->getICFG()->getCallICFGNode(inst);
|
|
1511
|
-
|
|
1515
|
+
FunEntryICFGNode* entry = pag->getICFG()->getFunEntryICFGNode(LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(taskFunc));
|
|
1516
|
+
addThreadForkEdge(pag->getValueNode(actualParm), pag->getValueNode(formalParm),icfgNode, entry);
|
|
1512
1517
|
}
|
|
1513
1518
|
}
|
|
1514
1519
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.367",
|
|
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": {
|