svf-lib 1.0.1815 → 1.0.1817
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/svf/libSvfCore.a +0 -0
- package/SVF-linux/svf/include/DDA/DDAStat.h +0 -17
- package/SVF-linux/svf/include/Graphs/ConsG.h +2 -0
- package/SVF-linux/svf/include/Util/PTAStat.h +19 -1
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +8 -0
- package/SVF-osx/svf/include/AbstractExecution/ExeState.h +8 -0
- package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +7 -0
- package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +3 -0
- package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +4 -0
- package/SVF-osx/svf/include/AbstractExecution/SingleAbsValue.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/SymState.h +4 -0
- package/SVF-osx/svf/include/AbstractExecution/WTO.h +5 -0
- package/SVF-osx/svf/include/CFL/CFGrammar.h +4 -0
- package/SVF-osx/svf/include/CFL/CFLAlias.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLStat.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLVF.h +1 -0
- package/SVF-osx/svf/include/DDA/ContextDDA.h +1 -0
- package/SVF-osx/svf/include/DDA/DDAClient.h +5 -0
- package/SVF-osx/svf/include/DDA/DDAPass.h +1 -0
- package/SVF-osx/svf/include/DDA/DDAStat.h +0 -17
- package/SVF-osx/svf/include/FastCluster/fastcluster.h +1 -0
- package/SVF-osx/svf/include/Graphs/CDG.h +3 -0
- package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +3 -0
- package/SVF-osx/svf/include/Graphs/CFLGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/CHG.h +4 -2
- package/SVF-osx/svf/include/Graphs/ConsG.h +2 -0
- package/SVF-osx/svf/include/Graphs/ConsGEdge.h +5 -0
- package/SVF-osx/svf/include/Graphs/ConsGNode.h +1 -0
- package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +1 -0
- package/SVF-osx/svf/include/Graphs/GenericGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/GraphPrinter.h +3 -0
- package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
- package/SVF-osx/svf/include/Graphs/ICFG.h +1 -0
- package/SVF-osx/svf/include/Graphs/ICFGNode.h +3 -0
- package/SVF-osx/svf/include/Graphs/ICFGStat.h +2 -0
- package/SVF-osx/svf/include/Graphs/IRGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/PTACallGraph.h +3 -0
- package/SVF-osx/svf/include/Graphs/SVFG.h +2 -0
- package/SVF-osx/svf/include/Graphs/SVFGEdge.h +1 -0
- package/SVF-osx/svf/include/Graphs/SVFGNode.h +7 -0
- package/SVF-osx/svf/include/Graphs/SVFGOPT.h +3 -0
- package/SVF-osx/svf/include/Graphs/SVFGStat.h +2 -0
- package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +3 -0
- package/SVF-osx/svf/include/Graphs/VFG.h +2 -0
- package/SVF-osx/svf/include/Graphs/VFGEdge.h +3 -0
- package/SVF-osx/svf/include/Graphs/VFGNode.h +8 -0
- package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +4 -0
- package/SVF-osx/svf/include/MSSA/MemPartition.h +1 -0
- package/SVF-osx/svf/include/MSSA/MemRegion.h +1 -0
- package/SVF-osx/svf/include/MSSA/MemSSA.h +1 -0
- package/SVF-osx/svf/include/MTA/FSMPTA.h +6 -0
- package/SVF-osx/svf/include/MTA/LockAnalysis.h +5 -0
- package/SVF-osx/svf/include/MTA/MHP.h +3 -0
- package/SVF-osx/svf/include/MTA/MTA.h +1 -0
- package/SVF-osx/svf/include/MTA/MTAResultValidator.h +2 -0
- package/SVF-osx/svf/include/MTA/TCT.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +2 -0
- package/SVF-osx/svf/include/MemoryModel/AccessPath.h +5 -0
- package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +5 -0
- package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointsTo.h +1 -0
- package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +1 -0
- package/SVF-osx/svf/include/SABER/ProgSlice.h +1 -0
- package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +4 -0
- package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +1 -0
- package/SVF-osx/svf/include/SVFIR/SVFIR.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFStatements.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFType.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFValue.h +3 -0
- package/SVF-osx/svf/include/SVFIR/SVFVariables.h +5 -0
- package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +5 -0
- package/SVF-osx/svf/include/Util/CDGBuilder.h +8 -0
- package/SVF-osx/svf/include/Util/CallGraphBuilder.h +2 -0
- package/SVF-osx/svf/include/Util/Casting.h +2 -1
- package/SVF-osx/svf/include/Util/CommandLine.h +1 -0
- package/SVF-osx/svf/include/Util/CxtStmt.h +4 -0
- package/SVF-osx/svf/include/Util/DPItem.h +2 -0
- package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
- package/SVF-osx/svf/include/Util/PTAStat.h +19 -1
- package/SVF-osx/svf/include/Util/SCC.h +2 -0
- package/SVF-osx/svf/include/Util/SVFBugReport.h +1 -0
- package/SVF-osx/svf/include/Util/SVFStat.h +1 -0
- package/SVF-osx/svf/include/Util/SVFUtil.h +1 -0
- package/SVF-osx/svf/include/Util/ThreadAPI.h +1 -0
- package/SVF-osx/svf/include/Util/WorkList.h +1 -0
- package/SVF-osx/svf/include/Util/Z3Expr.h +4 -0
- package/SVF-osx/svf/include/Util/iterator.h +2 -2
- package/SVF-osx/svf/include/WPA/Andersen.h +6 -0
- package/SVF-osx/svf/include/WPA/AndersenPWC.h +3 -0
- package/SVF-osx/svf/include/WPA/WPAFSSolver.h +5 -0
- package/SVF-osx/svf/include/WPA/WPAPass.h +2 -0
- package/SVF-osx/svf/include/WPA/WPASolver.h +2 -0
- package/SVF-osx/svf/include/WPA/WPAStat.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +3 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +1 -0
- package/package.json +1 -1
|
@@ -86,6 +86,7 @@ public:
|
|
|
86
86
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
|
|
89
90
|
/*!
|
|
90
91
|
* Copy edge
|
|
91
92
|
*/
|
|
@@ -116,6 +117,7 @@ public:
|
|
|
116
117
|
AddrCGEdge(ConstraintNode* s, ConstraintNode* d, EdgeID id);
|
|
117
118
|
};
|
|
118
119
|
|
|
120
|
+
|
|
119
121
|
/*!
|
|
120
122
|
* Copy edge
|
|
121
123
|
*/
|
|
@@ -148,6 +150,7 @@ public:
|
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
|
|
153
|
+
|
|
151
154
|
/*!
|
|
152
155
|
* Store edge
|
|
153
156
|
*/
|
|
@@ -181,6 +184,7 @@ public:
|
|
|
181
184
|
}
|
|
182
185
|
};
|
|
183
186
|
|
|
187
|
+
|
|
184
188
|
/*!
|
|
185
189
|
* Load edge
|
|
186
190
|
*/
|
|
@@ -214,6 +218,7 @@ public:
|
|
|
214
218
|
}
|
|
215
219
|
};
|
|
216
220
|
|
|
221
|
+
|
|
217
222
|
/*!
|
|
218
223
|
* Gep edge
|
|
219
224
|
*/
|
|
@@ -172,6 +172,7 @@ public:
|
|
|
172
172
|
static void addCustomGraphFeatures(const GraphType &, GraphWriter &) {}
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
|
|
175
176
|
/// DOTGraphTraits - Template class that can be specialized to customize how
|
|
176
177
|
/// graphs are converted to 'dot' graphs. When specializing, you may inherit
|
|
177
178
|
/// from DefaultDOTGraphTraits if you don't need to override everything.
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
/*
|
|
24
25
|
* GraphPrinter.h
|
|
25
26
|
*
|
|
@@ -105,4 +106,6 @@ public:
|
|
|
105
106
|
|
|
106
107
|
} // End namespace llvm
|
|
107
108
|
|
|
109
|
+
|
|
110
|
+
|
|
108
111
|
#endif /* INCLUDE_GRAPHS_GRAPHPRINTER_H_ */
|
|
@@ -115,7 +115,7 @@ nodes(const GraphType &G)
|
|
|
115
115
|
}
|
|
116
116
|
template <class GraphType>
|
|
117
117
|
iter_range<typename GenericGraphTraits<Inverse<GraphType>>::nodes_iterator>
|
|
118
|
-
|
|
118
|
+
inverse_nodes(const GraphType &G)
|
|
119
119
|
{
|
|
120
120
|
return make_range(GenericGraphTraits<Inverse<GraphType>>::nodes_begin(G),
|
|
121
121
|
GenericGraphTraits<Inverse<GraphType>>::nodes_end(G));
|
|
@@ -131,7 +131,7 @@ children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
|
131
131
|
|
|
132
132
|
template <class GraphType>
|
|
133
133
|
iter_range<typename GenericGraphTraits<Inverse<GraphType>>::ChildIteratorType>
|
|
134
|
-
|
|
134
|
+
inverse_children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
135
135
|
{
|
|
136
136
|
return make_range(GenericGraphTraits<Inverse<GraphType>>::child_begin(G),
|
|
137
137
|
GenericGraphTraits<Inverse<GraphType>>::child_end(G));
|
|
@@ -94,6 +94,7 @@ public:
|
|
|
94
94
|
return bb;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
|
|
97
98
|
/// Overloading operator << for dumping ICFG node ID
|
|
98
99
|
//@{
|
|
99
100
|
friend OutStream &operator<<(OutStream &o, const ICFGNode &node)
|
|
@@ -253,6 +254,7 @@ public:
|
|
|
253
254
|
//@}
|
|
254
255
|
};
|
|
255
256
|
|
|
257
|
+
|
|
256
258
|
/*!
|
|
257
259
|
* Function entry ICFGNode containing a set of FormalParmVFGNodes of a function
|
|
258
260
|
*/
|
|
@@ -478,6 +480,7 @@ public:
|
|
|
478
480
|
virtual const std::string toString() const;
|
|
479
481
|
};
|
|
480
482
|
|
|
483
|
+
|
|
481
484
|
/*!
|
|
482
485
|
* Return ICFGNode containing (at most one) ActualRetVFGNode at a callsite
|
|
483
486
|
*/
|
|
@@ -123,6 +123,7 @@ public:
|
|
|
123
123
|
else if (SVFUtil::isa<FunExitICFGNode>(node))
|
|
124
124
|
numOfExitNodes++;
|
|
125
125
|
|
|
126
|
+
|
|
126
127
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeIt =
|
|
127
128
|
it->second->OutEdgeBegin();
|
|
128
129
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeEit =
|
|
@@ -160,3 +161,4 @@ public:
|
|
|
160
161
|
} // End namespace SVF
|
|
161
162
|
|
|
162
163
|
#endif /* INCLUDE_UTIL_ICFGSTAT_H_ */
|
|
164
|
+
|
|
@@ -41,6 +41,7 @@ namespace SVF
|
|
|
41
41
|
class PTACallGraphNode;
|
|
42
42
|
class SVFModule;
|
|
43
43
|
|
|
44
|
+
|
|
44
45
|
/*
|
|
45
46
|
* Call Graph edge representing a calling relation between two functions
|
|
46
47
|
* Multiple calls from function A to B are merged into one call edge
|
|
@@ -57,6 +58,7 @@ public:
|
|
|
57
58
|
CallRetEdge,TDForkEdge,TDJoinEdge,HareParForEdge
|
|
58
59
|
};
|
|
59
60
|
|
|
61
|
+
|
|
60
62
|
private:
|
|
61
63
|
CallInstSet directCalls;
|
|
62
64
|
CallInstSet indirectCalls;
|
|
@@ -196,6 +198,7 @@ public:
|
|
|
196
198
|
/// Return TRUE if this function can be reached from main.
|
|
197
199
|
bool isReachableFromProgEntry() const;
|
|
198
200
|
|
|
201
|
+
|
|
199
202
|
/// Overloading operator << for dumping ICFG node ID
|
|
200
203
|
//@{
|
|
201
204
|
friend OutStream& operator<< (OutStream &o, const PTACallGraphNode &node)
|
|
@@ -57,6 +57,7 @@ typedef PHIVFGNode PHISVFGNode;
|
|
|
57
57
|
typedef IntraPHIVFGNode IntraPHISVFGNode;
|
|
58
58
|
typedef InterPHIVFGNode InterPHISVFGNode;
|
|
59
59
|
|
|
60
|
+
|
|
60
61
|
/*!
|
|
61
62
|
* Sparse value flow graph
|
|
62
63
|
* Each node stands for a definition, each edge stands for value flow relations
|
|
@@ -345,6 +346,7 @@ protected:
|
|
|
345
346
|
}
|
|
346
347
|
//@}
|
|
347
348
|
|
|
349
|
+
|
|
348
350
|
/// Given a PAGNode, set/get its def SVFG node (definition of top level pointers)
|
|
349
351
|
//@{
|
|
350
352
|
inline void setDef(const PAGNode* pagNode, const SVFGNode* node)
|
|
@@ -131,6 +131,7 @@ public:
|
|
|
131
131
|
virtual const std::string toString() const;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
|
|
134
135
|
/*
|
|
135
136
|
* SVFG Node stands for return mu node (address-taken variables)
|
|
136
137
|
*/
|
|
@@ -172,6 +173,7 @@ public:
|
|
|
172
173
|
virtual const std::string toString() const;
|
|
173
174
|
};
|
|
174
175
|
|
|
176
|
+
|
|
175
177
|
/*
|
|
176
178
|
* SVFG Node stands for callsite mu node (address-taken variables)
|
|
177
179
|
*/
|
|
@@ -200,6 +202,7 @@ public:
|
|
|
200
202
|
return ver;
|
|
201
203
|
}
|
|
202
204
|
|
|
205
|
+
|
|
203
206
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
204
207
|
//@{
|
|
205
208
|
static inline bool classof(const ActualINSVFGNode *)
|
|
@@ -219,6 +222,7 @@ public:
|
|
|
219
222
|
virtual const std::string toString() const;
|
|
220
223
|
};
|
|
221
224
|
|
|
225
|
+
|
|
222
226
|
/*
|
|
223
227
|
* SVFG Node stands for callsite chi node (address-taken variables)
|
|
224
228
|
*/
|
|
@@ -265,6 +269,7 @@ public:
|
|
|
265
269
|
virtual const std::string toString() const;
|
|
266
270
|
};
|
|
267
271
|
|
|
272
|
+
|
|
268
273
|
/*
|
|
269
274
|
* SVFG Node stands for a memory ssa phi node or formalIn or ActualOut
|
|
270
275
|
*/
|
|
@@ -392,6 +397,7 @@ public:
|
|
|
392
397
|
virtual const std::string toString() const;
|
|
393
398
|
};
|
|
394
399
|
|
|
400
|
+
|
|
395
401
|
/*
|
|
396
402
|
* Inter MSSA PHI (formalIN/ActualOUT)
|
|
397
403
|
*/
|
|
@@ -501,6 +507,7 @@ private:
|
|
|
501
507
|
const Version version;
|
|
502
508
|
};
|
|
503
509
|
|
|
510
|
+
|
|
504
511
|
} // End namespace SVF
|
|
505
512
|
|
|
506
513
|
#endif /* INCLUDE_MSSA_SVFGNODE_H_ */
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
+
|
|
35
36
|
#ifndef SVFGOPT_H_
|
|
36
37
|
#define SVFGOPT_H_
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
#include "Graphs/SVFG.h"
|
|
39
41
|
#include "Util/WorkList.h"
|
|
40
42
|
|
|
@@ -343,6 +345,7 @@ private:
|
|
|
343
345
|
}
|
|
344
346
|
//@}
|
|
345
347
|
|
|
348
|
+
|
|
346
349
|
NodeIDToNodeIDMap actualInToDefMap; ///< map actual-in to its def-site node
|
|
347
350
|
NodeIDToNodeIDMap formalOutToDefMap; ///< map formal-out to its def-site node
|
|
348
351
|
NodeBS defNodes; ///< preserved def nodes of formal-in/actual-out
|
|
@@ -153,6 +153,7 @@ public:
|
|
|
153
153
|
typedef GenericNode<PTACallGraphNode, HareParForEdge>::GEdgeSetTy ParForEdgeSet;
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
|
|
156
157
|
/*!
|
|
157
158
|
* Thread sensitive call graph
|
|
158
159
|
*/
|
|
@@ -196,6 +197,7 @@ public:
|
|
|
196
197
|
/// Update join edge using pointer analysis results
|
|
197
198
|
void updateJoinEdge(PointerAnalysis* pta);
|
|
198
199
|
|
|
200
|
+
|
|
199
201
|
/// Get call graph edge via call instruction
|
|
200
202
|
//@{
|
|
201
203
|
/// whether this call instruction has a valid call graph edge
|
|
@@ -360,6 +362,7 @@ public:
|
|
|
360
362
|
void addIndirectParForEdge(const CallICFGNode* cs, const SVFFunction* callee);
|
|
361
363
|
//@}
|
|
362
364
|
|
|
365
|
+
|
|
363
366
|
/// map call instruction to its CallGraphEdge map
|
|
364
367
|
inline void addThreadForkEdgeSetMap(const CallICFGNode* cs, ThreadForkEdge* edge)
|
|
365
368
|
{
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
#ifndef INCLUDE_UTIL_VFG_H_
|
|
31
31
|
#define INCLUDE_UTIL_VFG_H_
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
#include "SVFIR/SVFIR.h"
|
|
34
35
|
#include "Graphs/PTACallGraph.h"
|
|
35
36
|
#include "Graphs/VFGNode.h"
|
|
@@ -82,6 +83,7 @@ public:
|
|
|
82
83
|
typedef Set<const VFGNode*> GlobalVFGNodeSet;
|
|
83
84
|
typedef Set<const PAGNode*> PAGNodeSet;
|
|
84
85
|
|
|
86
|
+
|
|
85
87
|
protected:
|
|
86
88
|
NodeID totalVFGNode;
|
|
87
89
|
PAGNodeToDefMapTy PAGNodeToDefMap; ///< map a pag node to its definition SVG node
|
|
@@ -134,6 +134,7 @@ public:
|
|
|
134
134
|
virtual const std::string toString() const;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
+
|
|
137
138
|
/*!
|
|
138
139
|
* SVFG edge representing direct value-flows
|
|
139
140
|
*/
|
|
@@ -168,6 +169,7 @@ public:
|
|
|
168
169
|
virtual const std::string toString() const;
|
|
169
170
|
};
|
|
170
171
|
|
|
172
|
+
|
|
171
173
|
/*!
|
|
172
174
|
* Intra SVFG edge representing direct intra-procedural value-flows
|
|
173
175
|
*/
|
|
@@ -202,6 +204,7 @@ public:
|
|
|
202
204
|
virtual const std::string toString() const;
|
|
203
205
|
};
|
|
204
206
|
|
|
207
|
+
|
|
205
208
|
/*!
|
|
206
209
|
* SVFG call edge representing direct value-flows from a caller to its callee at a callsite
|
|
207
210
|
*/
|
|
@@ -316,6 +316,7 @@ public:
|
|
|
316
316
|
const std::string toString() const override;
|
|
317
317
|
};
|
|
318
318
|
|
|
319
|
+
|
|
319
320
|
/*!
|
|
320
321
|
* VFGNode for compare instruction, e.g., bool b = (a!=c);
|
|
321
322
|
*/
|
|
@@ -387,6 +388,7 @@ public:
|
|
|
387
388
|
const std::string toString() const override;
|
|
388
389
|
};
|
|
389
390
|
|
|
391
|
+
|
|
390
392
|
/*!
|
|
391
393
|
* VFGNode for binary operator instructions, e.g., a = b + c;
|
|
392
394
|
*/
|
|
@@ -701,6 +703,7 @@ public:
|
|
|
701
703
|
const std::string toString() const override;
|
|
702
704
|
};
|
|
703
705
|
|
|
706
|
+
|
|
704
707
|
/*
|
|
705
708
|
* Intra LLVM PHI Node
|
|
706
709
|
*/
|
|
@@ -753,6 +756,7 @@ public:
|
|
|
753
756
|
const std::string toString() const override;
|
|
754
757
|
};
|
|
755
758
|
|
|
759
|
+
|
|
756
760
|
class AddrVFGNode: public StmtVFGNode
|
|
757
761
|
{
|
|
758
762
|
private:
|
|
@@ -791,6 +795,7 @@ public:
|
|
|
791
795
|
const std::string toString() const override;
|
|
792
796
|
};
|
|
793
797
|
|
|
798
|
+
|
|
794
799
|
class ArgumentVFGNode : public VFGNode
|
|
795
800
|
{
|
|
796
801
|
|
|
@@ -886,6 +891,7 @@ public:
|
|
|
886
891
|
const std::string toString() const override;
|
|
887
892
|
};
|
|
888
893
|
|
|
894
|
+
|
|
889
895
|
/*
|
|
890
896
|
* ICFG Node stands for formal parameter node (top level pointers)
|
|
891
897
|
*/
|
|
@@ -1140,6 +1146,8 @@ private:
|
|
|
1140
1146
|
const CallICFGNode* callInst;
|
|
1141
1147
|
};
|
|
1142
1148
|
|
|
1149
|
+
|
|
1150
|
+
|
|
1143
1151
|
/*!
|
|
1144
1152
|
* Dummy Definition for undef and null pointers
|
|
1145
1153
|
*/
|
|
@@ -84,6 +84,7 @@ public:
|
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
|
|
87
88
|
/*!
|
|
88
89
|
* Indirect Memory Read
|
|
89
90
|
* 1) LoadMU at each store instruction
|
|
@@ -268,6 +269,7 @@ public:
|
|
|
268
269
|
}
|
|
269
270
|
};
|
|
270
271
|
|
|
272
|
+
|
|
271
273
|
/*!
|
|
272
274
|
* RetMU is annotated at function return, representing memory objects returns to callers
|
|
273
275
|
*/
|
|
@@ -312,6 +314,7 @@ public:
|
|
|
312
314
|
}
|
|
313
315
|
};
|
|
314
316
|
|
|
317
|
+
|
|
315
318
|
/*!
|
|
316
319
|
* Indirect Memory Definition
|
|
317
320
|
* 1) MSSACHI indirect memory object is modified
|
|
@@ -509,6 +512,7 @@ public:
|
|
|
509
512
|
}
|
|
510
513
|
};
|
|
511
514
|
|
|
515
|
+
|
|
512
516
|
/*!
|
|
513
517
|
*
|
|
514
518
|
* StoreCHI is annotated at each store instruction, representing a memory object is modified here
|
|
@@ -335,6 +335,7 @@ protected:
|
|
|
335
335
|
/// Get Mod-Ref of a callee function
|
|
336
336
|
virtual bool handleCallsiteModRef(NodeBS& mod, NodeBS& ref, const CallICFGNode* cs, const SVFFunction* fun);
|
|
337
337
|
|
|
338
|
+
|
|
338
339
|
/// Add cpts to store/load
|
|
339
340
|
//@{
|
|
340
341
|
inline void addCPtsToStore(NodeBS& cpts, const StoreStmt *st, const SVFFunction* fun)
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
#ifndef FSPTANALYSIS_H_
|
|
35
35
|
#define FSPTANALYSIS_H_
|
|
36
36
|
|
|
37
|
+
|
|
37
38
|
#include "WPA/FlowSensitive.h"
|
|
38
39
|
#include "MSSA/SVFGBuilder.h"
|
|
39
40
|
#include "MTA/LockAnalysis.h"
|
|
@@ -46,6 +47,7 @@ namespace SVF
|
|
|
46
47
|
class MHP;
|
|
47
48
|
class LockAnalysis;
|
|
48
49
|
|
|
50
|
+
|
|
49
51
|
class SVFGNodeLockSpan
|
|
50
52
|
{
|
|
51
53
|
public:
|
|
@@ -171,6 +173,7 @@ private:
|
|
|
171
173
|
Set<NodeIDPair> recordedges;
|
|
172
174
|
Map<NodeIDPair, PointsTo> edge2pts;
|
|
173
175
|
|
|
176
|
+
|
|
174
177
|
Map<const StmtSVFGNode*, SVFGNodeIDSet> prevset;
|
|
175
178
|
Map<const StmtSVFGNode*, SVFGNodeIDSet> succset;
|
|
176
179
|
|
|
@@ -180,6 +183,7 @@ private:
|
|
|
180
183
|
PairToBoolMap pairheadmap;
|
|
181
184
|
PairToBoolMap pairtailmap;
|
|
182
185
|
|
|
186
|
+
|
|
183
187
|
static const u32_t ADDEDGE_NOEDGE= 0;
|
|
184
188
|
static const u32_t ADDEDGE_NONSPARSE= 1;
|
|
185
189
|
static const u32_t ADDEDGE_ALLOPT= 2;
|
|
@@ -191,12 +195,14 @@ private:
|
|
|
191
195
|
|
|
192
196
|
};
|
|
193
197
|
|
|
198
|
+
|
|
194
199
|
/*!
|
|
195
200
|
* Flow-sensitive pointer analysis for multithreaded programs
|
|
196
201
|
*/
|
|
197
202
|
class FSMPTA : public FlowSensitive
|
|
198
203
|
{
|
|
199
204
|
|
|
205
|
+
|
|
200
206
|
public:
|
|
201
207
|
|
|
202
208
|
/// Constructor
|
|
@@ -266,6 +266,8 @@ public:
|
|
|
266
266
|
}
|
|
267
267
|
//@}
|
|
268
268
|
|
|
269
|
+
|
|
270
|
+
|
|
269
271
|
/// Check if one instruction's context stmt is in a lock span
|
|
270
272
|
inline bool hasOneCxtInLockSpan(const SVFInstruction *I, LockSpan lspan) const
|
|
271
273
|
{
|
|
@@ -297,6 +299,7 @@ public:
|
|
|
297
299
|
return true;
|
|
298
300
|
}
|
|
299
301
|
|
|
302
|
+
|
|
300
303
|
/// Check if two Instructions are protected by common locks
|
|
301
304
|
/// echo inst may have multiple cxt stmt
|
|
302
305
|
/// we check whether every cxt stmt of instructions is protected by a common lock.
|
|
@@ -466,6 +469,7 @@ private:
|
|
|
466
469
|
/// Map a statement to all its context-sensitive statements
|
|
467
470
|
InstToCxtStmtSet instToCxtStmtSet;
|
|
468
471
|
|
|
472
|
+
|
|
469
473
|
/// Context-sensitive locks
|
|
470
474
|
CxtLockSet cxtLockset;
|
|
471
475
|
|
|
@@ -500,6 +504,7 @@ private:
|
|
|
500
504
|
InstToInstSetMap instTocondCILocksMap;
|
|
501
505
|
//@}
|
|
502
506
|
|
|
507
|
+
|
|
503
508
|
public:
|
|
504
509
|
double lockTime;
|
|
505
510
|
u32_t numOfTotalQueries;
|
|
@@ -272,6 +272,7 @@ private:
|
|
|
272
272
|
InstToThreadStmtSetMap instToTSMap; ///< Map an instruction to its ThreadStmtSet
|
|
273
273
|
FuncPairToBool nonCandidateFuncMHPRelMap;
|
|
274
274
|
|
|
275
|
+
|
|
275
276
|
public:
|
|
276
277
|
u32_t numOfTotalQueries; ///< Total number of queries
|
|
277
278
|
u32_t numOfMHPQueries; ///< Number of queries are answered as may-happen-in-parallel
|
|
@@ -279,6 +280,8 @@ public:
|
|
|
279
280
|
double interleavingQueriesTime;
|
|
280
281
|
};
|
|
281
282
|
|
|
283
|
+
|
|
284
|
+
|
|
282
285
|
/*!
|
|
283
286
|
*
|
|
284
287
|
*/
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
/// Contains abstract classes for:
|
|
24
25
|
/// PTData: basic points-to data structure derived by all others.
|
|
25
26
|
/// DiffPTData: PTData which only propagates new changes, not entire points-to sets.
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
/// |
|
|
39
40
|
/// MutableIncDFPTData
|
|
40
41
|
|
|
42
|
+
|
|
41
43
|
/*
|
|
42
44
|
* AbstractPointsToDS.h
|
|
43
45
|
*
|
|
@@ -29,16 +29,20 @@
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
|
|
32
33
|
#ifndef AccessPath_H_
|
|
33
34
|
#define AccessPath_H_
|
|
34
35
|
|
|
36
|
+
|
|
35
37
|
#include "SVFIR/SVFValue.h"
|
|
36
38
|
|
|
39
|
+
|
|
37
40
|
namespace SVF
|
|
38
41
|
{
|
|
39
42
|
|
|
40
43
|
class SVFVar;
|
|
41
44
|
|
|
45
|
+
|
|
42
46
|
/*
|
|
43
47
|
* Location set represents a set of locations in a memory block with following offsets:
|
|
44
48
|
* { offset + \sum_{i=0}^N (stride_i * j_i) | 0 \leq j_i < M_i }
|
|
@@ -141,6 +145,7 @@ public:
|
|
|
141
145
|
/// Return element number of a type.
|
|
142
146
|
u32_t getElementNum(const SVFType* type) const;
|
|
143
147
|
|
|
148
|
+
|
|
144
149
|
bool addOffsetVarAndGepTypePair(const SVFVar* var, const SVFType* gepIterType);
|
|
145
150
|
|
|
146
151
|
/// Return TRUE if this is a constant location set.
|
|
@@ -74,6 +74,7 @@ public:
|
|
|
74
74
|
}
|
|
75
75
|
///@}
|
|
76
76
|
|
|
77
|
+
|
|
77
78
|
inline CondVar& operator= (const CondVar& rhs)
|
|
78
79
|
{
|
|
79
80
|
if(*this!=rhs)
|
|
@@ -84,6 +85,7 @@ public:
|
|
|
84
85
|
return *this;
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
|
|
87
89
|
/**
|
|
88
90
|
* Less than implementation.
|
|
89
91
|
*/
|
|
@@ -294,6 +296,7 @@ private:
|
|
|
294
296
|
ElementSet elements;
|
|
295
297
|
};
|
|
296
298
|
|
|
299
|
+
|
|
297
300
|
/*!
|
|
298
301
|
* Conditional Points-to set
|
|
299
302
|
*/
|
|
@@ -397,6 +400,7 @@ public:
|
|
|
397
400
|
return numElement()==0;
|
|
398
401
|
}
|
|
399
402
|
|
|
403
|
+
|
|
400
404
|
/// Overloading operators
|
|
401
405
|
//@{
|
|
402
406
|
inline CondPointsToSet<Cond>& operator=(
|
|
@@ -600,6 +604,7 @@ public:
|
|
|
600
604
|
}
|
|
601
605
|
//@}
|
|
602
606
|
|
|
607
|
+
|
|
603
608
|
/// Overloading operator |=
|
|
604
609
|
/// Merge CondPointsToSet of RHS into this one.
|
|
605
610
|
inline bool operator |= (const CondPointsToSet<Cond>& rhs)
|