svf-lib 1.0.2211 → 1.0.2213
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/AE/Svfexe/AbstractInterpretation.h +2 -2
- package/SVF-linux/Release-build/include/CFL/CFLAlias.h +1 -1
- package/SVF-linux/Release-build/include/DDA/ContextDDA.h +6 -6
- package/SVF-linux/Release-build/include/DDA/DDAVFSolver.h +2 -2
- package/SVF-linux/Release-build/include/DDA/FlowDDA.h +2 -2
- package/SVF-linux/Release-build/include/Graphs/BasicBlockG.h +17 -9
- package/SVF-linux/Release-build/include/Graphs/CHG.h +7 -7
- package/SVF-linux/Release-build/include/Graphs/CallGraph.h +23 -27
- package/SVF-linux/Release-build/include/Graphs/ConsG.h +2 -2
- package/SVF-linux/Release-build/include/Graphs/ICFG.h +11 -11
- package/SVF-linux/Release-build/include/Graphs/ICFGNode.h +12 -18
- package/SVF-linux/Release-build/include/Graphs/IRGraph.h +11 -9
- package/SVF-linux/Release-build/include/Graphs/SVFG.h +13 -13
- package/SVF-linux/Release-build/include/Graphs/SVFGNode.h +2 -2
- package/SVF-linux/Release-build/include/Graphs/ThreadCallGraph.h +3 -21
- package/SVF-linux/Release-build/include/Graphs/VFG.h +15 -15
- package/SVF-linux/Release-build/include/Graphs/VFGNode.h +10 -10
- package/SVF-linux/Release-build/include/MSSA/MSSAMuChi.h +6 -6
- package/SVF-linux/Release-build/include/MSSA/MemPartition.h +12 -12
- package/SVF-linux/Release-build/include/MSSA/MemRegion.h +21 -21
- package/SVF-linux/Release-build/include/MSSA/MemSSA.h +10 -10
- package/SVF-linux/Release-build/include/MTA/LockAnalysis.h +4 -4
- package/SVF-linux/Release-build/include/MTA/MHP.h +8 -8
- package/SVF-linux/Release-build/include/MTA/TCT.h +10 -10
- package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +4 -4
- package/SVF-linux/Release-build/include/SABER/DoubleFreeChecker.h +2 -2
- package/SVF-linux/Release-build/include/SABER/FileChecker.h +2 -2
- package/SVF-linux/Release-build/include/SABER/LeakChecker.h +4 -4
- package/SVF-linux/Release-build/include/SABER/SaberCheckerAPI.h +6 -5
- package/SVF-linux/Release-build/include/SABER/SaberCondAllocator.h +5 -5
- package/SVF-linux/Release-build/include/SABER/SrcSnkDDA.h +2 -2
- package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +83 -7
- package/SVF-linux/Release-build/include/SVF-LLVM/LLVMUtil.h +9 -1
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFIRBuilder.h +5 -2
- package/SVF-linux/Release-build/include/SVFIR/SVFIR.h +20 -27
- package/SVF-linux/Release-build/include/SVFIR/SVFValue.h +3 -2
- package/SVF-linux/Release-build/include/SVFIR/SVFVariables.h +271 -71
- package/SVF-linux/Release-build/include/Util/CDGBuilder.h +1 -1
- package/SVF-linux/Release-build/include/Util/CallGraphBuilder.h +1 -1
- package/SVF-linux/Release-build/include/Util/CxtStmt.h +6 -6
- package/SVF-linux/Release-build/include/Util/ExtAPI.h +20 -16
- package/SVF-linux/Release-build/include/Util/SVFUtil.h +16 -30
- package/SVF-linux/Release-build/include/Util/ThreadAPI.h +2 -11
- package/SVF-linux/Release-build/include/WPA/Andersen.h +2 -2
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/DDA/DDAClient.h +6 -11
- package/SVF-osx/Release-build/include/DDA/DDAPass.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/CHG.h +2 -3
- package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +1 -286
- package/SVF-osx/Release-build/include/MTA/MTA.h +2 -2
- package/SVF-osx/Release-build/include/MTA/TCT.h +0 -6
- package/SVF-osx/Release-build/include/MemoryModel/PointerAnalysis.h +1 -7
- package/SVF-osx/Release-build/include/SABER/DoubleFreeChecker.h +1 -1
- package/SVF-osx/Release-build/include/SABER/FileChecker.h +1 -1
- package/SVF-osx/Release-build/include/SABER/LeakChecker.h +1 -1
- package/SVF-osx/Release-build/include/SABER/SaberCondAllocator.h +1 -2
- package/SVF-osx/Release-build/include/SABER/SrcSnkDDA.h +2 -2
- package/SVF-osx/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/DCHG.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMLoopAnalysis.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +2 -2
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
- package/SVF-osx/Release-build/include/{SVFIR → SVF-LLVM}/SVFModule.h +1 -36
- package/SVF-osx/Release-build/include/SVF-LLVM/SVFValue.h +805 -0
- package/SVF-osx/Release-build/include/SVFIR/ObjTypeInfo.h +0 -1
- package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +38 -11
- package/SVF-osx/Release-build/include/SVFIR/SVFStatements.h +1 -0
- package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +202 -799
- package/SVF-osx/Release-build/include/Util/CDGBuilder.h +1 -1
- package/SVF-osx/Release-build/include/Util/GeneralType.h +1 -0
- package/SVF-osx/Release-build/include/Util/SVFLoopAndDomInfo.h +169 -0
- package/SVF-osx/Release-build/include/Util/SVFUtil.h +3 -1
- package/SVF-osx/Release-build/include/Util/ThreadAPI.h +2 -1
- package/SVF-osx/Release-build/include/WPA/FlowSensitive.h +1 -1
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ private:
|
|
|
67
67
|
|
|
68
68
|
/// extract basic block edges to be processed
|
|
69
69
|
static void
|
|
70
|
-
extractBBS(const
|
|
70
|
+
extractBBS(const FunObjVar *func,
|
|
71
71
|
Map<const SVFBasicBlock *, std::vector<const SVFBasicBlock *>> &res);
|
|
72
72
|
|
|
73
73
|
/// extract nodes between two nodes in pdom tree
|
|
@@ -47,7 +47,7 @@ public:
|
|
|
47
47
|
CallGraphBuilder()=default;
|
|
48
48
|
|
|
49
49
|
/// Buidl SVFIR callgraoh
|
|
50
|
-
CallGraph* buildSVFIRCallGraph(
|
|
50
|
+
CallGraph* buildSVFIRCallGraph(const std::vector<const FunObjVar*>& funset);
|
|
51
51
|
|
|
52
52
|
/// Buidl PTA callgraoh
|
|
53
53
|
CallGraph* buildPTACallGraph();
|
|
@@ -310,7 +310,7 @@ class CxtProc
|
|
|
310
310
|
{
|
|
311
311
|
public:
|
|
312
312
|
/// Constructor
|
|
313
|
-
CxtProc(const CallStrCxt& c, const
|
|
313
|
+
CxtProc(const CallStrCxt& c, const FunObjVar* f) :
|
|
314
314
|
cxt(c), fun(f)
|
|
315
315
|
{
|
|
316
316
|
}
|
|
@@ -324,7 +324,7 @@ public:
|
|
|
324
324
|
{
|
|
325
325
|
}
|
|
326
326
|
/// Return current procedure
|
|
327
|
-
inline const
|
|
327
|
+
inline const FunObjVar* getProc() const
|
|
328
328
|
{
|
|
329
329
|
return fun;
|
|
330
330
|
}
|
|
@@ -383,7 +383,7 @@ public:
|
|
|
383
383
|
|
|
384
384
|
protected:
|
|
385
385
|
CallStrCxt cxt;
|
|
386
|
-
const
|
|
386
|
+
const FunObjVar* fun;
|
|
387
387
|
};
|
|
388
388
|
|
|
389
389
|
|
|
@@ -397,7 +397,7 @@ class CxtThreadProc : public CxtProc
|
|
|
397
397
|
{
|
|
398
398
|
public:
|
|
399
399
|
/// Constructor
|
|
400
|
-
CxtThreadProc(NodeID t, const CallStrCxt& c, const
|
|
400
|
+
CxtThreadProc(NodeID t, const CallStrCxt& c, const FunObjVar* f) :CxtProc(c,f),tid(t)
|
|
401
401
|
{
|
|
402
402
|
}
|
|
403
403
|
/// Copy constructor
|
|
@@ -494,8 +494,8 @@ template <> struct std::hash<SVF::CxtProc>
|
|
|
494
494
|
{
|
|
495
495
|
size_t operator()(const SVF::CxtProc& cs) const
|
|
496
496
|
{
|
|
497
|
-
std::hash<SVF::
|
|
498
|
-
SVF::
|
|
497
|
+
std::hash<SVF::FunObjVar*> h;
|
|
498
|
+
SVF::FunObjVar* fun = const_cast<SVF::FunObjVar*> (cs.getProc());
|
|
499
499
|
return h(fun);
|
|
500
500
|
}
|
|
501
501
|
};
|
|
@@ -41,15 +41,19 @@
|
|
|
41
41
|
namespace SVF
|
|
42
42
|
{
|
|
43
43
|
|
|
44
|
+
class FunObjVar;
|
|
45
|
+
|
|
44
46
|
class ExtAPI
|
|
45
47
|
{
|
|
46
48
|
friend class LLVMModuleSet;
|
|
49
|
+
friend class SVFIRBuilder;
|
|
50
|
+
|
|
47
51
|
private:
|
|
48
52
|
|
|
49
53
|
static ExtAPI *extOp;
|
|
50
54
|
|
|
51
55
|
// Map SVFFunction to its annotations
|
|
52
|
-
Map<const
|
|
56
|
+
Map<const FunObjVar*, std::vector<std::string>> funObjVar2Annotations;
|
|
53
57
|
|
|
54
58
|
// extapi.bc file path
|
|
55
59
|
static std::string extBcPath;
|
|
@@ -69,44 +73,44 @@ public:
|
|
|
69
73
|
std::string getExtBcPath();
|
|
70
74
|
|
|
71
75
|
// Get the annotation of (F)
|
|
72
|
-
std::string getExtFuncAnnotation(const
|
|
76
|
+
std::string getExtFuncAnnotation(const FunObjVar* fun, const std::string&funcAnnotation);
|
|
73
77
|
|
|
74
|
-
const std::vector<std::string>& getExtFuncAnnotations(const
|
|
78
|
+
const std::vector<std::string>& getExtFuncAnnotations(const FunObjVar*fun);
|
|
75
79
|
|
|
76
80
|
// Does (F) have some annotation?
|
|
77
|
-
bool hasExtFuncAnnotation(const
|
|
81
|
+
bool hasExtFuncAnnotation(const FunObjVar* fun, const std::string&funcAnnotation);
|
|
82
|
+
|
|
83
|
+
public:
|
|
78
84
|
|
|
79
85
|
// Does (F) have a static var X (unavailable to us) that its return points to?
|
|
80
|
-
bool has_static(const
|
|
86
|
+
bool has_static(const FunObjVar *F);
|
|
81
87
|
|
|
82
88
|
// Does (F) have a memcpy_like operation?
|
|
83
|
-
bool is_memcpy(const
|
|
89
|
+
bool is_memcpy(const FunObjVar *F);
|
|
84
90
|
|
|
85
91
|
// Does (F) have a memset_like operation?
|
|
86
|
-
bool is_memset(const
|
|
92
|
+
bool is_memset(const FunObjVar *F);
|
|
87
93
|
|
|
88
94
|
// Does (F) allocate a new object and return it?
|
|
89
|
-
bool is_alloc(const
|
|
95
|
+
bool is_alloc(const FunObjVar *F);
|
|
90
96
|
|
|
91
97
|
// Does (F) allocate a new object and assign it to one of its arguments?
|
|
92
|
-
bool is_arg_alloc(const
|
|
98
|
+
bool is_arg_alloc(const FunObjVar *F);
|
|
93
99
|
|
|
94
100
|
// Does (F) allocate a new stack object and return it?
|
|
95
|
-
bool is_alloc_stack_ret(const
|
|
101
|
+
bool is_alloc_stack_ret(const FunObjVar *F);
|
|
96
102
|
|
|
97
103
|
// Get the position of argument which holds the new object
|
|
98
|
-
s32_t get_alloc_arg_pos(const
|
|
104
|
+
s32_t get_alloc_arg_pos(const FunObjVar *F);
|
|
99
105
|
|
|
100
106
|
// Does (F) reallocate a new object?
|
|
101
|
-
bool is_realloc(const
|
|
107
|
+
bool is_realloc(const FunObjVar *F);
|
|
102
108
|
|
|
103
|
-
|
|
104
|
-
// or a user-defined version of a known alloc or no-op)?
|
|
105
|
-
bool is_ext(const SVFFunction *F);
|
|
109
|
+
bool is_ext(const FunObjVar* funObjVar);
|
|
106
110
|
|
|
107
111
|
private:
|
|
108
112
|
// Set the annotation of (F)
|
|
109
|
-
void setExtFuncAnnotations(const
|
|
113
|
+
void setExtFuncAnnotations(const FunObjVar* fun, const std::vector<std::string>&funcAnnotations);
|
|
110
114
|
};
|
|
111
115
|
} // End namespace SVF
|
|
112
116
|
|
|
@@ -187,7 +187,7 @@ inline bool isNonInstricCallSite(const ICFGNode* inst)
|
|
|
187
187
|
/// Match arguments for callsite at caller and callee
|
|
188
188
|
/// if the arg size does not match then we do not need to connect this parameter
|
|
189
189
|
/// unless the callee is a variadic function (the first parameter of variadic function is its parameter number)
|
|
190
|
-
bool matchArgs(const CallICFGNode* cs, const
|
|
190
|
+
bool matchArgs(const CallICFGNode* cs, const FunObjVar* callee);
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
/// Split into two substrings around the first occurrence of a separator string.
|
|
@@ -266,46 +266,37 @@ void stopAnalysisLimitTimer(bool limitTimerSet);
|
|
|
266
266
|
/// Return true if the call is an external call (external library in function summary table)
|
|
267
267
|
/// If the library function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
|
|
268
268
|
//@{
|
|
269
|
-
inline bool isExtCall(const SVFFunction* fun)
|
|
270
|
-
{
|
|
271
|
-
return fun && ExtAPI::getExtAPI()->is_ext(fun);
|
|
272
|
-
}
|
|
273
269
|
|
|
274
|
-
|
|
275
|
-
{
|
|
276
|
-
return fun && ExtAPI::getExtAPI()->is_memcpy(fun);
|
|
277
|
-
}
|
|
270
|
+
bool isExtCall(const FunObjVar* fun);
|
|
278
271
|
|
|
279
|
-
inline bool isMemsetExtFun(const SVFFunction* fun)
|
|
280
|
-
{
|
|
281
|
-
return fun && ExtAPI::getExtAPI()->is_memset(fun);
|
|
282
|
-
}
|
|
283
272
|
|
|
284
273
|
/// Return true if the call is a heap allocator/reallocator
|
|
285
274
|
//@{
|
|
286
275
|
/// note that these two functions are not suppose to be used externally
|
|
287
|
-
|
|
276
|
+
|
|
277
|
+
inline bool isHeapAllocExtFunViaRet(const FunObjVar* fun)
|
|
288
278
|
{
|
|
289
279
|
return fun && (ExtAPI::getExtAPI()->is_alloc(fun)
|
|
290
280
|
|| ExtAPI::getExtAPI()->is_realloc(fun));
|
|
291
281
|
}
|
|
292
282
|
|
|
293
|
-
inline bool isHeapAllocExtFunViaArg(const
|
|
283
|
+
inline bool isHeapAllocExtFunViaArg(const FunObjVar* fun)
|
|
294
284
|
{
|
|
295
285
|
return fun && ExtAPI::getExtAPI()->is_arg_alloc(fun);
|
|
296
286
|
}
|
|
297
287
|
|
|
298
288
|
/// Get the position of argument that holds an allocated heap object.
|
|
299
289
|
//@{
|
|
300
|
-
|
|
290
|
+
|
|
291
|
+
inline u32_t getHeapAllocHoldingArgPosition(const FunObjVar* fun)
|
|
301
292
|
{
|
|
302
293
|
return ExtAPI::getExtAPI()->get_alloc_arg_pos(fun);
|
|
303
294
|
}
|
|
304
|
-
|
|
305
295
|
/// Return true if the call is a heap reallocator
|
|
306
296
|
//@{
|
|
307
297
|
/// note that this function is not suppose to be used externally
|
|
308
|
-
|
|
298
|
+
|
|
299
|
+
inline bool isReallocExtFun(const FunObjVar* fun)
|
|
309
300
|
{
|
|
310
301
|
return fun && (ExtAPI::getExtAPI()->is_realloc(fun));
|
|
311
302
|
}
|
|
@@ -313,25 +304,20 @@ inline bool isReallocExtFun(const SVFFunction* fun)
|
|
|
313
304
|
/// Program entry function e.g. main
|
|
314
305
|
//@{
|
|
315
306
|
/// Return true if this is a program entry function (e.g. main)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return fun && fun->getName() == "main";
|
|
319
|
-
}
|
|
307
|
+
|
|
308
|
+
bool isProgEntryFunction(const FunObjVar*);
|
|
320
309
|
|
|
321
310
|
/// Get program entry function from function name.
|
|
322
|
-
const
|
|
311
|
+
const FunObjVar* getProgFunction(const std::string& funName);
|
|
323
312
|
|
|
324
313
|
/// Get program entry function.
|
|
325
|
-
const
|
|
314
|
+
const FunObjVar*getProgEntryFunction();
|
|
315
|
+
|
|
326
316
|
|
|
327
317
|
/// Return true if this is a program exit function call
|
|
328
318
|
//@{
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
return fun && (fun->getName() == "exit" ||
|
|
332
|
-
fun->getName() == "__assert_rtn" ||
|
|
333
|
-
fun->getName() == "__assert_fail" );
|
|
334
|
-
}
|
|
319
|
+
bool isProgExitFunction(const FunObjVar *fun);
|
|
320
|
+
|
|
335
321
|
|
|
336
322
|
|
|
337
323
|
bool isArgOfUncalledFunction(const SVFVar* svfvar);
|
|
@@ -91,16 +91,7 @@ private:
|
|
|
91
91
|
static ThreadAPI* tdAPI;
|
|
92
92
|
|
|
93
93
|
/// Get the function type if it is a threadAPI function
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
if(F)
|
|
97
|
-
{
|
|
98
|
-
TDAPIMap::const_iterator it= tdAPIMap.find(F->getName());
|
|
99
|
-
if(it != tdAPIMap.end())
|
|
100
|
-
return it->second;
|
|
101
|
-
}
|
|
102
|
-
return TD_DUMMY;
|
|
103
|
-
}
|
|
94
|
+
TD_TYPE getType(const FunObjVar* F) const;
|
|
104
95
|
|
|
105
96
|
public:
|
|
106
97
|
/// Return a static reference
|
|
@@ -136,7 +127,7 @@ public:
|
|
|
136
127
|
const ValVar* getActualParmAtForkSite(const CallICFGNode *inst) const;
|
|
137
128
|
|
|
138
129
|
/// Return the formal parm of forked function (the first arg in pthread)
|
|
139
|
-
const SVFVar* getFormalParmOfForkedFun(const
|
|
130
|
+
const SVFVar* getFormalParmOfForkedFun(const FunObjVar* F) const;
|
|
140
131
|
//@}
|
|
141
132
|
|
|
142
133
|
|
|
@@ -93,11 +93,11 @@ public:
|
|
|
93
93
|
virtual bool updateThreadCallGraph(const CallSiteToFunPtrMap&, NodePairSet&);
|
|
94
94
|
|
|
95
95
|
/// Connect formal and actual parameters for indirect forksites
|
|
96
|
-
virtual void connectCaller2ForkedFunParams(const CallICFGNode* cs, const
|
|
96
|
+
virtual void connectCaller2ForkedFunParams(const CallICFGNode* cs, const FunObjVar* F,
|
|
97
97
|
NodePairSet& cpySrcNodes);
|
|
98
98
|
|
|
99
99
|
/// Connect formal and actual parameters for indirect callsites
|
|
100
|
-
virtual void connectCaller2CalleeParams(const CallICFGNode* cs, const
|
|
100
|
+
virtual void connectCaller2CalleeParams(const CallICFGNode* cs, const FunObjVar* F,
|
|
101
101
|
NodePairSet& cpySrcNodes);
|
|
102
102
|
|
|
103
103
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -48,11 +48,11 @@ namespace SVF
|
|
|
48
48
|
class DDAClient
|
|
49
49
|
{
|
|
50
50
|
public:
|
|
51
|
-
DDAClient(
|
|
51
|
+
DDAClient() : pag(nullptr), curPtr(0), solveAll(true) {}
|
|
52
52
|
|
|
53
53
|
virtual ~DDAClient() {}
|
|
54
54
|
|
|
55
|
-
virtual inline void initialise(
|
|
55
|
+
virtual inline void initialise() {}
|
|
56
56
|
|
|
57
57
|
/// Collect candidate pointers for query.
|
|
58
58
|
virtual inline OrderedNodeSet& collectCandidateQueries(SVFIR* p)
|
|
@@ -91,16 +91,12 @@ public:
|
|
|
91
91
|
userInput.insert(ptr);
|
|
92
92
|
solveAll = false;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
inline SVFModule* getModule() const
|
|
96
|
-
{
|
|
97
|
-
return module;
|
|
98
|
-
}
|
|
94
|
+
|
|
99
95
|
virtual void answerQueries(PointerAnalysis* pta);
|
|
100
96
|
|
|
101
97
|
virtual inline void performStat(PointerAnalysis*) {}
|
|
102
98
|
|
|
103
|
-
virtual inline void collectWPANum(
|
|
99
|
+
virtual inline void collectWPANum() {}
|
|
104
100
|
protected:
|
|
105
101
|
void addCandidate(NodeID id)
|
|
106
102
|
{
|
|
@@ -109,7 +105,6 @@ protected:
|
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
SVFIR* pag; ///< SVFIR graph used by current DDA analysis
|
|
112
|
-
SVFModule* module; ///< LLVM module
|
|
113
108
|
NodeID curPtr; ///< current pointer being queried
|
|
114
109
|
OrderedNodeSet candidateQueries; ///< store all candidate pointers to be queried
|
|
115
110
|
|
|
@@ -128,7 +123,7 @@ private:
|
|
|
128
123
|
typedef OrderedMap<NodeID,const CallICFGNode*> VTablePtrToCallSiteMap;
|
|
129
124
|
VTablePtrToCallSiteMap vtableToCallSiteMap;
|
|
130
125
|
public:
|
|
131
|
-
FunptrDDAClient(
|
|
126
|
+
FunptrDDAClient() : DDAClient() {}
|
|
132
127
|
~FunptrDDAClient() {}
|
|
133
128
|
|
|
134
129
|
/// Only collect function pointers as query candidates.
|
|
@@ -147,7 +142,7 @@ class AliasDDAClient : public DDAClient
|
|
|
147
142
|
public:
|
|
148
143
|
typedef OrderedSet<const PAGNode*> PAGNodeSet;
|
|
149
144
|
|
|
150
|
-
AliasDDAClient(
|
|
145
|
+
AliasDDAClient() : DDAClient() {}
|
|
151
146
|
~AliasDDAClient() {}
|
|
152
147
|
|
|
153
148
|
/// Only collect function pointers as query candidates.
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
#ifndef CHA_H_
|
|
34
34
|
#define CHA_H_
|
|
35
35
|
|
|
36
|
-
#include "
|
|
36
|
+
#include "Util/ThreadAPI.h"
|
|
37
37
|
#include "Graphs/GenericGraph.h"
|
|
38
38
|
#include "Util/WorkList.h"
|
|
39
39
|
|
|
@@ -252,7 +252,7 @@ public:
|
|
|
252
252
|
DESTRUCTOR = 0x2 // connect node based on destructor
|
|
253
253
|
} RELATIONTYPE;
|
|
254
254
|
|
|
255
|
-
CHGraph(
|
|
255
|
+
CHGraph(): classNum(0), vfID(0), buildingCHGTime(0)
|
|
256
256
|
{
|
|
257
257
|
this->kind = Standard;
|
|
258
258
|
}
|
|
@@ -318,7 +318,6 @@ public:
|
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
private:
|
|
321
|
-
SVFModule* svfMod;
|
|
322
321
|
u32_t classNum;
|
|
323
322
|
u32_t vfID;
|
|
324
323
|
double buildingCHGTime;
|