svf-tools 1.0.366 → 1.0.370
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/AndersenStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAClient_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +2 -2
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +8 -6
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +26 -24
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/ICFG_8h_source.html +3 -2
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +10 -6
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +52 -48
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +45 -41
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +42 -40
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +104 -98
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +1 -1
- 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_1AndersenStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt-members.html +42 -43
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +15 -18
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +31 -31
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallCFGEdge.html +13 -13
- 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-members.html +42 -43
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +16 -19
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1DDAClient.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +21 -16
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge-members.html +27 -26
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge.html +120 -81
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt-members.html +45 -46
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +25 -63
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt-members.html +47 -48
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +34 -35
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetCFGEdge.html +14 -14
- 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 +135 -110
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +177 -139
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt-members.html +44 -45
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt.html +21 -24
- 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_1TypeBasedHeapCloning.html +1 -1
- 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/classSVF_1_1VersionedFlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/functions_a.html +9 -9
- package/SVF-doxygen/html/html/functions_b.html +7 -12
- package/SVF-doxygen/html/html/functions_c.html +30 -23
- package/SVF-doxygen/html/html/functions_e.html +6 -2
- package/SVF-doxygen/html/html/functions_func.html +9 -9
- package/SVF-doxygen/html/html/functions_func_c.html +1 -1
- package/SVF-doxygen/html/html/functions_func_g.html +18 -20
- package/SVF-doxygen/html/html/functions_func_r.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +2 -2
- package/SVF-doxygen/html/html/functions_g.html +20 -22
- 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_m.html +1 -1
- package/SVF-doxygen/html/html/functions_n.html +4 -4
- package/SVF-doxygen/html/html/functions_o.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +9 -9
- package/SVF-doxygen/html/html/functions_r.html +3 -5
- package/SVF-doxygen/html/html/functions_s.html +20 -22
- package/SVF-doxygen/html/html/functions_t.html +5 -5
- package/SVF-doxygen/html/html/functions_type_b.html +0 -3
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/functions_vars_b.html +2 -2
- package/SVF-doxygen/html/html/functions_vars_c.html +7 -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/functions_w.html +5 -9
- package/SVF-doxygen/html/html/search/all_1.js +9 -9
- package/SVF-doxygen/html/html/search/all_10.js +5 -5
- package/SVF-doxygen/html/html/search/all_12.js +3 -3
- package/SVF-doxygen/html/html/search/all_13.js +8 -8
- package/SVF-doxygen/html/html/search/all_14.js +6 -6
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_2.js +2 -3
- package/SVF-doxygen/html/html/search/all_3.js +3 -2
- package/SVF-doxygen/html/html/search/all_5.js +2 -2
- package/SVF-doxygen/html/html/search/all_7.js +5 -7
- 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_d.js +2 -2
- package/SVF-doxygen/html/html/search/all_e.js +2 -2
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +9 -9
- 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 +5 -7
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_1.js +0 -1
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_2.js +1 -1
- package/SVF-doxygen/html/html/search/variables_3.js +2 -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_d.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +1 -1
- package/include/Graphs/ICFG.h +1 -1
- package/include/Graphs/ICFGEdge.h +17 -14
- package/include/MemoryModel/SVFIR.h +4 -4
- package/include/MemoryModel/SVFStatements.h +26 -25
- package/include/SVF-FE/SVFIRBuilder.h +11 -9
- package/include/Util/ExtAPI.h +1 -1
- package/lib/Graphs/ICFG.cpp +4 -4
- package/lib/MemoryModel/PAGBuilderFromFile.cpp +2 -2
- package/lib/MemoryModel/SVFIR.cpp +10 -9
- package/lib/MemoryModel/SVFStatements.cpp +6 -6
- package/lib/SVF-FE/ICFGBuilder.cpp +8 -3
- package/lib/SVF-FE/SVFIRBuilder.cpp +14 -9
- package/lib/Util/ExtAPI.cpp +0 -1
- package/package.json +1 -1
|
@@ -112,15 +112,8 @@ class IntraCFGEdge : public ICFGEdge
|
|
|
112
112
|
{
|
|
113
113
|
|
|
114
114
|
public:
|
|
115
|
-
/// the first element is a boolean (for if/else) or numeric condition value (for switch)
|
|
116
|
-
/// the second element is the value when this condition should hold to execute this CFGEdge.
|
|
117
|
-
/// e.g., Inst1: br %cmp label 0, label 1, Inst2 is label 0 and Inst 3 is label 1;
|
|
118
|
-
/// for edge between Inst1 and Inst 2, the first element is %cmp and second element is 0
|
|
119
|
-
|
|
120
|
-
typedef std::pair<const Value*,NodeID> BranchCondition;
|
|
121
|
-
|
|
122
115
|
/// Constructor
|
|
123
|
-
IntraCFGEdge(ICFGNode* s, ICFGNode* d): ICFGEdge(s,d,IntraCF)
|
|
116
|
+
IntraCFGEdge(ICFGNode* s, ICFGNode* d): ICFGEdge(s,d,IntraCF), conditionVar(nullptr), branchCondVal(0)
|
|
124
117
|
{
|
|
125
118
|
}
|
|
126
119
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
@@ -139,19 +132,29 @@ public:
|
|
|
139
132
|
}
|
|
140
133
|
//@}
|
|
141
134
|
|
|
142
|
-
const
|
|
143
|
-
return
|
|
135
|
+
const Value* getCondition() const{
|
|
136
|
+
return conditionVar;
|
|
144
137
|
}
|
|
145
138
|
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
const s64_t getSuccessorCondValue() const{
|
|
140
|
+
assert(getCondition() && "this is not a conditional branch edge");
|
|
141
|
+
return branchCondVal;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
void setBranchCondition(const Value* c, s64_t bVal){
|
|
145
|
+
conditionVar = c;
|
|
146
|
+
branchCondVal = bVal;
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
virtual const std::string toString() const;
|
|
151
150
|
|
|
152
151
|
private:
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
/// conditionVar is a boolean (for if/else) or numeric condition variable (for switch)
|
|
153
|
+
/// branchCondVal is the value when this condition should hold to execute this CFGEdge.
|
|
154
|
+
/// e.g., Inst1: br %cmp label 0, label 1, Inst2 is label 0 and Inst 3 is label 1;
|
|
155
|
+
/// for edge between Inst1 and Inst 2, the first element is %cmp and second element is 0
|
|
156
|
+
const Value* conditionVar;
|
|
157
|
+
s64_t branchCondVal;
|
|
155
158
|
};
|
|
156
159
|
|
|
157
160
|
|
|
@@ -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
|
|
|
@@ -629,15 +639,6 @@ public:
|
|
|
629
639
|
{
|
|
630
640
|
return SVFStmt::getDstNode();
|
|
631
641
|
}
|
|
632
|
-
/// Return the position of this op
|
|
633
|
-
const u32_t getOpPos(const SVFVar* op) const{
|
|
634
|
-
for(u32_t i = 0; i < getOpVarNum(); i++){
|
|
635
|
-
if(getOpVar(i)==op)
|
|
636
|
-
return i;
|
|
637
|
-
}
|
|
638
|
-
assert(false && "this operand not found!");
|
|
639
|
-
abort();
|
|
640
|
-
}
|
|
641
642
|
|
|
642
643
|
NodeID getOpVarID(u32_t pos) const;
|
|
643
644
|
NodeID getResID() const;
|
|
@@ -708,8 +709,8 @@ public:
|
|
|
708
709
|
}
|
|
709
710
|
|
|
710
711
|
/// Return the corresponding ICFGNode of this operand
|
|
711
|
-
inline const ICFGNode* getOpICFGNode(
|
|
712
|
-
return opICFGNodes.at(
|
|
712
|
+
inline const ICFGNode* getOpICFGNode(u32_t op_idx) const{
|
|
713
|
+
return opICFGNodes.at(op_idx);
|
|
713
714
|
}
|
|
714
715
|
|
|
715
716
|
/// Return true if this is a phi at the function exit
|
|
@@ -1022,8 +1023,8 @@ public:
|
|
|
1022
1023
|
//@}
|
|
1023
1024
|
|
|
1024
1025
|
/// constructor
|
|
1025
|
-
TDForkPE(SVFVar* s, SVFVar* d, const CallICFGNode* i) :
|
|
1026
|
-
CallPE(s,d,i,SVFStmt::ThreadFork)
|
|
1026
|
+
TDForkPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunEntryICFGNode* entry) :
|
|
1027
|
+
CallPE(s,d,i,entry,SVFStmt::ThreadFork)
|
|
1027
1028
|
{
|
|
1028
1029
|
}
|
|
1029
1030
|
|
|
@@ -1060,8 +1061,8 @@ public:
|
|
|
1060
1061
|
//@}
|
|
1061
1062
|
|
|
1062
1063
|
/// Constructor
|
|
1063
|
-
TDJoinPE(SVFVar* s, SVFVar* d, const CallICFGNode* i) :
|
|
1064
|
-
RetPE(s,d,i,SVFStmt::ThreadJoin)
|
|
1064
|
+
TDJoinPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunExitICFGNode* e) :
|
|
1065
|
+
RetPE(s,d,i,e, SVFStmt::ThreadJoin)
|
|
1065
1066
|
{
|
|
1066
1067
|
}
|
|
1067
1068
|
|
|
@@ -309,7 +309,9 @@ public:
|
|
|
309
309
|
inline PhiStmt* addPhiStmt(NodeID res, NodeID opnd, const ICFGNode* pred)
|
|
310
310
|
{
|
|
311
311
|
PhiStmt *edge = pag->addPhiStmt(res,opnd,pred);
|
|
312
|
-
|
|
312
|
+
/// If we already added this phi node, then skip this adding
|
|
313
|
+
if(edge)
|
|
314
|
+
setCurrentBBAndValueForPAGEdge(edge);
|
|
313
315
|
return edge;
|
|
314
316
|
}
|
|
315
317
|
/// Add SelectStmt
|
|
@@ -366,16 +368,16 @@ public:
|
|
|
366
368
|
return edge;
|
|
367
369
|
}
|
|
368
370
|
/// Add Call edge
|
|
369
|
-
inline CallPE* addCallEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
371
|
+
inline CallPE* addCallEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
370
372
|
{
|
|
371
|
-
CallPE *edge = pag->addCallPE(src, dst, cs);
|
|
373
|
+
CallPE *edge = pag->addCallPE(src, dst, cs, entry);
|
|
372
374
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
373
375
|
return edge;
|
|
374
376
|
}
|
|
375
377
|
/// Add Return edge
|
|
376
|
-
inline RetPE* addRetEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
378
|
+
inline RetPE* addRetEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
377
379
|
{
|
|
378
|
-
RetPE *edge = pag->addRetPE(src, dst, cs);
|
|
380
|
+
RetPE *edge = pag->addRetPE(src, dst, cs, exit);
|
|
379
381
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
380
382
|
return edge;
|
|
381
383
|
}
|
|
@@ -401,16 +403,16 @@ public:
|
|
|
401
403
|
return edge;
|
|
402
404
|
}
|
|
403
405
|
/// Add Thread fork edge for parameter passing
|
|
404
|
-
inline TDForkPE* addThreadForkEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
406
|
+
inline TDForkPE* addThreadForkEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
405
407
|
{
|
|
406
|
-
TDForkPE *edge = pag->addThreadForkPE(src, dst, cs);
|
|
408
|
+
TDForkPE *edge = pag->addThreadForkPE(src, dst, cs, entry);
|
|
407
409
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
408
410
|
return edge;
|
|
409
411
|
}
|
|
410
412
|
/// Add Thread join edge for parameter passing
|
|
411
|
-
inline TDJoinPE* addThreadJoinEdge(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
413
|
+
inline TDJoinPE* addThreadJoinEdge(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
412
414
|
{
|
|
413
|
-
TDJoinPE *edge = pag->addThreadJoinPE(src, dst, cs);
|
|
415
|
+
TDJoinPE *edge = pag->addThreadJoinPE(src, dst, cs, exit);
|
|
414
416
|
setCurrentBBAndValueForPAGEdge(edge);
|
|
415
417
|
return edge;
|
|
416
418
|
}
|
package/include/Util/ExtAPI.h
CHANGED
|
@@ -139,7 +139,7 @@ public:
|
|
|
139
139
|
funName = "llvm." + F->getName().split('.').second.split('.').first.str();
|
|
140
140
|
}
|
|
141
141
|
llvm::StringMap<extf_t>::const_iterator it= info.find(funName);
|
|
142
|
-
if(it == info.end()
|
|
142
|
+
if(it == info.end())
|
|
143
143
|
return EFT_OTHER;
|
|
144
144
|
else
|
|
145
145
|
return it->second;
|
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -149,10 +149,10 @@ const std::string ICFGEdge::toString() const {
|
|
|
149
149
|
const std::string IntraCFGEdge::toString() const {
|
|
150
150
|
std::string str;
|
|
151
151
|
raw_string_ostream rawstr(str);
|
|
152
|
-
if(
|
|
152
|
+
if(getCondition() == nullptr)
|
|
153
153
|
rawstr << "IntraCFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t";
|
|
154
154
|
else
|
|
155
|
-
rawstr << "IntraCFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "]
|
|
155
|
+
rawstr << "IntraCFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "] (branchCondition:" << *getCondition() << ") (succCondValue: " << getSuccessorCondValue() << ") \t";
|
|
156
156
|
|
|
157
157
|
return rawstr.str();
|
|
158
158
|
}
|
|
@@ -352,7 +352,7 @@ ICFGEdge* ICFG::addIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode)
|
|
|
352
352
|
/*!
|
|
353
353
|
* Add conditional intraprocedural edges between two nodes
|
|
354
354
|
*/
|
|
355
|
-
ICFGEdge* ICFG::addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Value* condition,
|
|
355
|
+
ICFGEdge* ICFG::addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Value* condition, s64_t branchCondVal){
|
|
356
356
|
|
|
357
357
|
checkIntraEdgeParents(srcNode, dstNode);
|
|
358
358
|
if(ICFGEdge* edge = hasIntraICFGEdge(srcNode,dstNode, ICFGEdge::IntraCF))
|
|
@@ -363,7 +363,7 @@ ICFGEdge* ICFG::addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, co
|
|
|
363
363
|
else
|
|
364
364
|
{
|
|
365
365
|
IntraCFGEdge* intraEdge = new IntraCFGEdge(srcNode,dstNode);
|
|
366
|
-
intraEdge->
|
|
366
|
+
intraEdge->setBranchCondition(condition,branchCondVal);
|
|
367
367
|
return (addICFGEdge(intraEdge) ? intraEdge : nullptr);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
@@ -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")
|
|
@@ -98,7 +98,8 @@ PhiStmt* SVFIR::addPhiStmt(NodeID res, NodeID opnd, const ICFGNode* pred)
|
|
|
98
98
|
}
|
|
99
99
|
else{
|
|
100
100
|
it->second->addOpVar(opNode,pred);
|
|
101
|
-
return
|
|
101
|
+
/// return null if we already added this PhiStmt
|
|
102
|
+
return nullptr;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -240,7 +241,7 @@ StoreStmt* SVFIR::addStoreStmt(NodeID src, NodeID dst, const IntraICFGNode* curV
|
|
|
240
241
|
/*!
|
|
241
242
|
* Add Call edge
|
|
242
243
|
*/
|
|
243
|
-
CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
244
|
+
CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
244
245
|
{
|
|
245
246
|
SVFVar* srcNode = getGNode(src);
|
|
246
247
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -248,7 +249,7 @@ CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
248
249
|
return SVFUtil::cast<CallPE>(edge);
|
|
249
250
|
else
|
|
250
251
|
{
|
|
251
|
-
CallPE* callPE = new CallPE(srcNode, dstNode, cs);
|
|
252
|
+
CallPE* callPE = new CallPE(srcNode, dstNode, cs,entry);
|
|
252
253
|
addToStmt2TypeMap(callPE);
|
|
253
254
|
addEdge(srcNode,dstNode, callPE);
|
|
254
255
|
return callPE;
|
|
@@ -258,7 +259,7 @@ CallPE* SVFIR::addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
258
259
|
/*!
|
|
259
260
|
* Add Return edge
|
|
260
261
|
*/
|
|
261
|
-
RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
262
|
+
RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
262
263
|
{
|
|
263
264
|
SVFVar* srcNode = getGNode(src);
|
|
264
265
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -266,7 +267,7 @@ RetPE* SVFIR::addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
266
267
|
return SVFUtil::cast<RetPE>(edge);
|
|
267
268
|
else
|
|
268
269
|
{
|
|
269
|
-
RetPE* retPE = new RetPE(srcNode, dstNode, cs);
|
|
270
|
+
RetPE* retPE = new RetPE(srcNode, dstNode, cs, exit);
|
|
270
271
|
addToStmt2TypeMap(retPE);
|
|
271
272
|
addEdge(srcNode,dstNode, retPE);
|
|
272
273
|
return retPE;
|
|
@@ -287,7 +288,7 @@ SVFStmt* SVFIR::addBlackHoleAddrStmt(NodeID node)
|
|
|
287
288
|
/*!
|
|
288
289
|
* Add Thread fork edge for parameter passing from a spawner to its spawnees
|
|
289
290
|
*/
|
|
290
|
-
TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
291
|
+
TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunEntryICFGNode* entry)
|
|
291
292
|
{
|
|
292
293
|
SVFVar* srcNode = getGNode(src);
|
|
293
294
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -295,7 +296,7 @@ TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
295
296
|
return SVFUtil::cast<TDForkPE>(edge);
|
|
296
297
|
else
|
|
297
298
|
{
|
|
298
|
-
TDForkPE* forkPE = new TDForkPE(srcNode, dstNode, cs);
|
|
299
|
+
TDForkPE* forkPE = new TDForkPE(srcNode, dstNode, cs, entry);
|
|
299
300
|
addToStmt2TypeMap(forkPE);
|
|
300
301
|
addEdge(srcNode,dstNode, forkPE);
|
|
301
302
|
return forkPE;
|
|
@@ -305,7 +306,7 @@ TDForkPE* SVFIR::addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
305
306
|
/*!
|
|
306
307
|
* Add Thread fork edge for parameter passing from a spawnee back to its spawners
|
|
307
308
|
*/
|
|
308
|
-
TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
309
|
+
TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs, const FunExitICFGNode* exit)
|
|
309
310
|
{
|
|
310
311
|
SVFVar* srcNode = getGNode(src);
|
|
311
312
|
SVFVar* dstNode = getGNode(dst);
|
|
@@ -313,7 +314,7 @@ TDJoinPE* SVFIR::addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs)
|
|
|
313
314
|
return SVFUtil::cast<TDJoinPE>(edge);
|
|
314
315
|
else
|
|
315
316
|
{
|
|
316
|
-
TDJoinPE* joinPE = new TDJoinPE(srcNode, dstNode, cs);
|
|
317
|
+
TDJoinPE* joinPE = new TDJoinPE(srcNode, dstNode, cs, exit);
|
|
317
318
|
addToStmt2TypeMap(joinPE);
|
|
318
319
|
addEdge(srcNode,dstNode, joinPE);
|
|
319
320
|
return joinPE;
|
|
@@ -90,9 +90,9 @@ const std::string CopyStmt::toString() const{
|
|
|
90
90
|
const std::string PhiStmt::toString() const{
|
|
91
91
|
std::string str;
|
|
92
92
|
raw_string_ostream rawstr(str);
|
|
93
|
-
rawstr << "PhiStmt: [Var" << getResID() << " <-- (
|
|
94
|
-
for(
|
|
95
|
-
rawstr <<
|
|
93
|
+
rawstr << "PhiStmt: [Var" << getResID() << " <-- (";
|
|
94
|
+
for(u32_t i = 0; i < getOpVarNum(); i++)
|
|
95
|
+
rawstr << "[Var" << getOpVar(i)->getId() << ", ICFGNode" << getOpICFGNode(i)->getId() << "],";
|
|
96
96
|
rawstr << ")]\t";
|
|
97
97
|
if (Options::ShowSVFIRValue) {
|
|
98
98
|
rawstr << "\n";
|
|
@@ -152,12 +152,12 @@ const std::string BranchStmt::toString() const {
|
|
|
152
152
|
std::string str;
|
|
153
153
|
raw_string_ostream rawstr(str);
|
|
154
154
|
if(isConditional())
|
|
155
|
-
rawstr << "BranchStmt: [Condition Var" << getCondition()->getId() << "]\
|
|
155
|
+
rawstr << "BranchStmt: [Condition Var" << getCondition()->getId() << "]\n";
|
|
156
156
|
else
|
|
157
|
-
rawstr << "BranchStmt: [" << " Unconditional branch" << "]\
|
|
157
|
+
rawstr << "BranchStmt: [" << " Unconditional branch" << "]\n";
|
|
158
158
|
|
|
159
159
|
for(u32_t i = 0; i < getNumSuccessors(); i++)
|
|
160
|
-
rawstr << "Successor " << i << " ICFGNode" << getSuccessor(i)->getId() << "
|
|
160
|
+
rawstr << "Successor " << i << " ICFGNode" << getSuccessor(i)->getId() << " ";
|
|
161
161
|
|
|
162
162
|
if (Options::ShowSVFIRValue) {
|
|
163
163
|
rawstr << "\n";
|
|
@@ -97,7 +97,7 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
|
|
|
97
97
|
}
|
|
98
98
|
InstVec nextInsts;
|
|
99
99
|
getNextInsts(inst, nextInsts);
|
|
100
|
-
|
|
100
|
+
u32_t branchID = 0;
|
|
101
101
|
for (InstVec::const_iterator nit = nextInsts.begin(), enit =
|
|
102
102
|
nextInsts.end(); nit != enit; ++nit)
|
|
103
103
|
{
|
|
@@ -112,14 +112,19 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
|
|
|
112
112
|
|
|
113
113
|
if (const BranchInst* br = SVFUtil::dyn_cast<BranchInst>(inst))
|
|
114
114
|
{
|
|
115
|
+
assert(branchID <= 2 && "if/else has more than two branches?");
|
|
115
116
|
if(br->isConditional())
|
|
116
|
-
icfg->addConditionalIntraEdge(srcNode, dstNode, br->getCondition(), branchID);
|
|
117
|
+
icfg->addConditionalIntraEdge(srcNode, dstNode, br->getCondition(), 1 - branchID);
|
|
117
118
|
else
|
|
118
119
|
icfg->addIntraEdge(srcNode, dstNode);
|
|
119
120
|
}
|
|
120
121
|
else if (const SwitchInst* si = SVFUtil::dyn_cast<SwitchInst>(inst))
|
|
121
122
|
{
|
|
122
|
-
|
|
123
|
+
/// branch condition value
|
|
124
|
+
const ConstantInt* condVal = const_cast<SwitchInst*>(si)->findCaseDest(const_cast<BasicBlock*>(succ->getParent()));
|
|
125
|
+
/// default case is set to -1;
|
|
126
|
+
s64_t val = condVal ? condVal->getSExtValue() : -1;
|
|
127
|
+
icfg->addConditionalIntraEdge(srcNode, dstNode, si->getCondition(),val);
|
|
123
128
|
}
|
|
124
129
|
else
|
|
125
130
|
icfg->addIntraEdge(srcNode, dstNode);
|
|
@@ -74,7 +74,7 @@ SVFIR* SVFIRBuilder::build(SVFModule* svfModule)
|
|
|
74
74
|
{
|
|
75
75
|
const SVFFunction& fun = **fit;
|
|
76
76
|
/// collect return node of function fun
|
|
77
|
-
if(!
|
|
77
|
+
if(!fun.isDeclaration())
|
|
78
78
|
{
|
|
79
79
|
/// Return SVFIR node will not be created for function which can not
|
|
80
80
|
/// reach the return instruction due to call to abort(), exit(),
|
|
@@ -629,7 +629,7 @@ void SVFIRBuilder::visitPHINode(PHINode &inst)
|
|
|
629
629
|
const Value* val = inst.getIncomingValue(i);
|
|
630
630
|
const Instruction* incomingInst = SVFUtil::dyn_cast<Instruction>(val);
|
|
631
631
|
assert((incomingInst==nullptr) || (incomingInst->getFunction() == inst.getFunction()));
|
|
632
|
-
const Instruction* predInst = &inst.getIncomingBlock(i)->
|
|
632
|
+
const Instruction* predInst = &inst.getIncomingBlock(i)->back();
|
|
633
633
|
const ICFGNode* icfgNode = pag->getICFG()->getICFGNode(predInst);
|
|
634
634
|
NodeID src = getValueNode(val);
|
|
635
635
|
addPhiStmt(dst,src,icfgNode);
|
|
@@ -893,7 +893,7 @@ void SVFIRBuilder::visitBranchInst(BranchInst &inst){
|
|
|
893
893
|
BranchStmt::SuccAndCondPairVec successors;
|
|
894
894
|
for (u32_t i = 0; i < inst.getNumSuccessors(); ++i)
|
|
895
895
|
{
|
|
896
|
-
const Instruction* succInst = &inst.getSuccessor(i)->
|
|
896
|
+
const Instruction* succInst = &inst.getSuccessor(i)->front();
|
|
897
897
|
const ICFGNode* icfgNode = pag->getICFG()->getICFGNode(succInst);
|
|
898
898
|
successors.push_back(std::make_pair(icfgNode, 1-i));
|
|
899
899
|
}
|
|
@@ -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/lib/Util/ExtAPI.cpp
CHANGED
|
@@ -461,7 +461,6 @@ static const ei_pair ei_pairs[]=
|
|
|
461
461
|
{"SSLv23_client_method", ExtAPI::EFT_ALLOC},
|
|
462
462
|
{"SyGetmem", ExtAPI::EFT_ALLOC},
|
|
463
463
|
{"TLSv1_client_method", ExtAPI::EFT_ALLOC},
|
|
464
|
-
{"Void_ExtendCore", ExtAPI::EFT_ALLOC},
|
|
465
464
|
{"XAddExtension", ExtAPI::EFT_ALLOC},
|
|
466
465
|
{"XAllocClassHint", ExtAPI::EFT_ALLOC},
|
|
467
466
|
{"XAllocSizeHints", ExtAPI::EFT_ALLOC},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.370",
|
|
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": {
|