svf-lib 1.0.2080 → 1.0.2082
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 +1 -1
- package/SVF-linux/Release-build/include/DDA/ContextDDA.h +2 -2
- package/SVF-linux/Release-build/include/DDA/DDAVFSolver.h +5 -5
- package/SVF-linux/Release-build/include/DDA/FlowDDA.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/{PTACallGraph.h → CallGraph.h} +41 -41
- package/SVF-linux/Release-build/include/Graphs/ICFG.h +2 -2
- package/SVF-linux/Release-build/include/Graphs/ThreadCallGraph.h +24 -30
- package/SVF-linux/Release-build/include/Graphs/VFG.h +4 -4
- package/SVF-linux/Release-build/include/MSSA/MemRegion.h +4 -4
- package/SVF-linux/Release-build/include/MTA/LockAnalysis.h +42 -32
- package/SVF-linux/Release-build/include/MTA/MHP.h +34 -54
- package/SVF-linux/Release-build/include/MTA/MTAStat.h +1 -2
- package/SVF-linux/Release-build/include/MTA/TCT.h +43 -25
- package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +13 -13
- package/SVF-linux/Release-build/include/SABER/SaberSVFGBuilder.h +1 -1
- package/SVF-linux/Release-build/include/SABER/SrcSnkDDA.h +7 -7
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFIRBuilder.h +1 -1
- package/SVF-linux/Release-build/include/Util/CallGraphBuilder.h +5 -5
- package/SVF-linux/Release-build/include/Util/CxtStmt.h +13 -12
- package/SVF-linux/Release-build/include/Util/Options.h +1 -20
- package/SVF-linux/Release-build/include/Util/SVFUtil.h +8 -43
- package/SVF-linux/Release-build/include/Util/ThreadAPI.h +42 -85
- 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/Graphs/IRGraph.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/ThreadCallGraph.h +0 -2
- package/SVF-osx/Release-build/include/MTA/MHP.h +0 -2
- package/SVF-osx/Release-build/include/MTA/MTA.h +0 -3
- package/SVF-osx/Release-build/include/SABER/SaberCheckerAPI.h +4 -20
- package/SVF-osx/Release-build/include/Util/SVFUtil.h +1 -40
- 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
- package/SVF-linux/Release-build/include/MTA/FSMPTA.h +0 -270
- package/SVF-linux/Release-build/include/MTA/MTAResultValidator.h +0 -448
- package/SVF-linux/Release-build/include/MTA/PCG.h +0 -229
|
@@ -36,6 +36,7 @@ namespace SVF
|
|
|
36
36
|
{
|
|
37
37
|
|
|
38
38
|
class SVFModule;
|
|
39
|
+
class ICFGNode;
|
|
39
40
|
|
|
40
41
|
/*
|
|
41
42
|
* ThreadAPI class contains interfaces for pthread programs
|
|
@@ -119,32 +120,21 @@ public:
|
|
|
119
120
|
|
|
120
121
|
/// Return the callee/callsite/func
|
|
121
122
|
//@{
|
|
123
|
+
const SVFFunction* getCallee(const ICFGNode *inst) const;
|
|
122
124
|
const SVFFunction* getCallee(const SVFInstruction *inst) const;
|
|
123
|
-
const SVFFunction* getCallee(const CallSite cs) const;
|
|
124
125
|
const CallSite getSVFCallSite(const SVFInstruction *inst) const;
|
|
126
|
+
const CallSite getSVFCallSite(const ICFGNode *inst) const;
|
|
125
127
|
//@}
|
|
126
128
|
|
|
127
129
|
/// Return true if this call create a new thread
|
|
128
130
|
//@{
|
|
129
|
-
inline bool isTDFork(const
|
|
131
|
+
inline bool isTDFork(const ICFGNode *inst) const
|
|
130
132
|
{
|
|
131
133
|
return getType(getCallee(inst)) == TD_FORK;
|
|
132
134
|
}
|
|
133
|
-
inline bool isTDFork(
|
|
135
|
+
inline bool isTDFork(const SVFInstruction* cs) const
|
|
134
136
|
{
|
|
135
|
-
return
|
|
136
|
-
}
|
|
137
|
-
//@}
|
|
138
|
-
|
|
139
|
-
/// Return true if this call proceeds a hare_parallel_for
|
|
140
|
-
//@{
|
|
141
|
-
inline bool isHareParFor(const SVFInstruction *inst) const
|
|
142
|
-
{
|
|
143
|
-
return getType(getCallee(inst)) == HARE_PAR_FOR;
|
|
144
|
-
}
|
|
145
|
-
inline bool isHareParFor(CallSite cs) const
|
|
146
|
-
{
|
|
147
|
-
return isTDFork(cs.getInstruction());
|
|
137
|
+
return getType(getCallee(cs)) == TD_FORK;
|
|
148
138
|
}
|
|
149
139
|
//@}
|
|
150
140
|
|
|
@@ -152,81 +142,59 @@ public:
|
|
|
152
142
|
//@{
|
|
153
143
|
/// Return the first argument of the call,
|
|
154
144
|
/// Note that, it is the pthread_t pointer
|
|
155
|
-
inline const SVFValue* getForkedThread(const
|
|
145
|
+
inline const SVFValue* getForkedThread(const ICFGNode *inst) const
|
|
156
146
|
{
|
|
157
147
|
assert(isTDFork(inst) && "not a thread fork function!");
|
|
158
148
|
CallSite cs = getSVFCallSite(inst);
|
|
159
149
|
return cs.getArgument(0);
|
|
160
150
|
}
|
|
161
|
-
inline const SVFValue* getForkedThread(
|
|
151
|
+
inline const SVFValue* getForkedThread(const SVFInstruction* inst) const
|
|
162
152
|
{
|
|
163
|
-
|
|
153
|
+
assert(isTDFork(inst) && "not a thread fork function!");
|
|
154
|
+
CallSite cs = getSVFCallSite(inst);
|
|
155
|
+
return cs.getArgument(0);
|
|
164
156
|
}
|
|
165
157
|
|
|
166
158
|
/// Return the third argument of the call,
|
|
167
159
|
/// Note that, it could be function type or a void* pointer
|
|
168
|
-
inline const SVFValue* getForkedFun(const
|
|
160
|
+
inline const SVFValue* getForkedFun(const ICFGNode *inst) const
|
|
169
161
|
{
|
|
170
162
|
assert(isTDFork(inst) && "not a thread fork function!");
|
|
171
163
|
CallSite cs = getSVFCallSite(inst);
|
|
172
164
|
return cs.getArgument(2);
|
|
173
165
|
}
|
|
174
|
-
inline const SVFValue* getForkedFun(
|
|
166
|
+
inline const SVFValue* getForkedFun(const SVFInstruction* inst) const
|
|
175
167
|
{
|
|
176
|
-
|
|
168
|
+
assert(isTDFork(inst) && "not a thread fork function!");
|
|
169
|
+
CallSite cs = getSVFCallSite(inst);
|
|
170
|
+
return cs.getArgument(2);
|
|
177
171
|
}
|
|
178
172
|
|
|
179
173
|
/// Return the forth argument of the call,
|
|
180
174
|
/// Note that, it is the sole argument of start routine ( a void* pointer )
|
|
181
|
-
inline const SVFValue* getActualParmAtForkSite(const
|
|
175
|
+
inline const SVFValue* getActualParmAtForkSite(const ICFGNode *inst) const
|
|
182
176
|
{
|
|
183
177
|
assert(isTDFork(inst) && "not a thread fork function!");
|
|
184
178
|
CallSite cs = getSVFCallSite(inst);
|
|
185
179
|
return cs.getArgument(3);
|
|
186
180
|
}
|
|
187
|
-
inline const SVFValue* getActualParmAtForkSite(
|
|
188
|
-
{
|
|
189
|
-
return getActualParmAtForkSite(cs.getInstruction());
|
|
190
|
-
}
|
|
191
|
-
//@}
|
|
192
|
-
|
|
193
|
-
/// Get the task function (i.e., the 5th parameter) of the hare_parallel_for call
|
|
194
|
-
//@{
|
|
195
|
-
inline const SVFValue* getTaskFuncAtHareParForSite(const SVFInstruction *inst) const
|
|
196
|
-
{
|
|
197
|
-
assert(isHareParFor(inst) && "not a hare_parallel_for function!");
|
|
198
|
-
CallSite cs = getSVFCallSite(inst);
|
|
199
|
-
return cs.getArgument(4);
|
|
200
|
-
}
|
|
201
|
-
inline const SVFValue* getTaskFuncAtHareParForSite(CallSite cs) const
|
|
202
|
-
{
|
|
203
|
-
return getTaskFuncAtHareParForSite(cs.getInstruction());
|
|
204
|
-
}
|
|
205
|
-
//@}
|
|
206
|
-
|
|
207
|
-
/// Get the task data (i.e., the 6th parameter) of the hare_parallel_for call
|
|
208
|
-
//@{
|
|
209
|
-
inline const SVFValue* getTaskDataAtHareParForSite(const SVFInstruction *inst) const
|
|
181
|
+
inline const SVFValue* getActualParmAtForkSite(const SVFInstruction* inst) const
|
|
210
182
|
{
|
|
211
|
-
assert(
|
|
183
|
+
assert(isTDFork(inst) && "not a thread fork function!");
|
|
212
184
|
CallSite cs = getSVFCallSite(inst);
|
|
213
|
-
return cs.getArgument(
|
|
214
|
-
}
|
|
215
|
-
inline const SVFValue* getTaskDataAtHareParForSite(CallSite cs) const
|
|
216
|
-
{
|
|
217
|
-
return getTaskDataAtHareParForSite(cs.getInstruction());
|
|
185
|
+
return cs.getArgument(3);
|
|
218
186
|
}
|
|
219
187
|
//@}
|
|
220
188
|
|
|
221
189
|
/// Return true if this call wait for a worker thread
|
|
222
190
|
//@{
|
|
223
|
-
inline bool isTDJoin(const
|
|
191
|
+
inline bool isTDJoin(const ICFGNode *inst) const
|
|
224
192
|
{
|
|
225
193
|
return getType(getCallee(inst)) == TD_JOIN;
|
|
226
194
|
}
|
|
227
|
-
inline bool isTDJoin(
|
|
195
|
+
inline bool isTDJoin(const SVFInstruction* inst) const
|
|
228
196
|
{
|
|
229
|
-
return
|
|
197
|
+
return getType(getCallee(inst)) == TD_JOIN;
|
|
230
198
|
}
|
|
231
199
|
//@}
|
|
232
200
|
|
|
@@ -234,90 +202,79 @@ public:
|
|
|
234
202
|
//@{
|
|
235
203
|
/// Return the first argument of the call,
|
|
236
204
|
/// Note that, it is the pthread_t pointer
|
|
237
|
-
const SVFValue* getJoinedThread(const
|
|
238
|
-
inline const SVFValue* getJoinedThread(CallSite cs) const
|
|
239
|
-
{
|
|
240
|
-
return getJoinedThread(cs.getInstruction());
|
|
241
|
-
}
|
|
205
|
+
const SVFValue* getJoinedThread(const ICFGNode *inst) const;
|
|
242
206
|
/// Return the send argument of the call,
|
|
243
207
|
/// Note that, it is the pthread_t pointer
|
|
244
|
-
inline const SVFValue* getRetParmAtJoinedSite(const
|
|
208
|
+
inline const SVFValue* getRetParmAtJoinedSite(const ICFGNode *inst) const
|
|
245
209
|
{
|
|
246
210
|
assert(isTDJoin(inst) && "not a thread join function!");
|
|
247
211
|
CallSite cs = getSVFCallSite(inst);
|
|
248
212
|
return cs.getArgument(1);
|
|
249
213
|
}
|
|
250
|
-
inline const SVFValue* getRetParmAtJoinedSite(
|
|
214
|
+
inline const SVFValue* getRetParmAtJoinedSite(const SVFInstruction* inst) const
|
|
251
215
|
{
|
|
252
|
-
|
|
216
|
+
assert(isTDJoin(inst) && "not a thread join function!");
|
|
217
|
+
CallSite cs = getSVFCallSite(inst);
|
|
218
|
+
return cs.getArgument(1);
|
|
253
219
|
}
|
|
254
220
|
//@}
|
|
255
221
|
|
|
256
222
|
|
|
257
223
|
/// Return true if this call exits/terminate a thread
|
|
258
224
|
//@{
|
|
259
|
-
inline bool isTDExit(const
|
|
225
|
+
inline bool isTDExit(const ICFGNode *inst) const
|
|
260
226
|
{
|
|
261
227
|
return getType(getCallee(inst)) == TD_EXIT;
|
|
262
228
|
}
|
|
263
229
|
|
|
264
|
-
inline bool isTDExit(
|
|
230
|
+
inline bool isTDExit(const SVFInstruction* inst) const
|
|
265
231
|
{
|
|
266
|
-
return getType(getCallee(
|
|
232
|
+
return getType(getCallee(inst)) == TD_EXIT;
|
|
267
233
|
}
|
|
268
234
|
//@}
|
|
269
235
|
|
|
270
236
|
/// Return true if this call acquire a lock
|
|
271
237
|
//@{
|
|
272
|
-
inline bool isTDAcquire(const
|
|
238
|
+
inline bool isTDAcquire(const ICFGNode* inst) const
|
|
273
239
|
{
|
|
274
240
|
return getType(getCallee(inst)) == TD_ACQUIRE;
|
|
275
241
|
}
|
|
276
242
|
|
|
277
|
-
inline bool isTDAcquire(
|
|
243
|
+
inline bool isTDAcquire(const SVFInstruction* inst) const
|
|
278
244
|
{
|
|
279
|
-
return getType(getCallee(
|
|
245
|
+
return getType(getCallee(inst)) == TD_ACQUIRE;
|
|
280
246
|
}
|
|
281
247
|
//@}
|
|
282
248
|
|
|
283
249
|
/// Return true if this call release a lock
|
|
284
250
|
//@{
|
|
285
|
-
inline bool isTDRelease(const
|
|
251
|
+
inline bool isTDRelease(const ICFGNode *inst) const
|
|
286
252
|
{
|
|
287
253
|
return getType(getCallee(inst)) == TD_RELEASE;
|
|
288
254
|
}
|
|
289
255
|
|
|
290
|
-
inline bool isTDRelease(
|
|
256
|
+
inline bool isTDRelease(const SVFInstruction* inst) const
|
|
291
257
|
{
|
|
292
|
-
return getType(getCallee(
|
|
258
|
+
return getType(getCallee(inst)) == TD_RELEASE;
|
|
293
259
|
}
|
|
294
260
|
//@}
|
|
295
261
|
|
|
296
262
|
/// Return lock value
|
|
297
263
|
//@{
|
|
298
264
|
/// First argument of pthread_mutex_lock/pthread_mutex_unlock
|
|
299
|
-
|
|
300
|
-
{
|
|
301
|
-
assert((isTDAcquire(inst) || isTDRelease(inst)) && "not a lock acquire or release function");
|
|
302
|
-
CallSite cs = getSVFCallSite(inst);
|
|
303
|
-
return cs.getArgument(0);
|
|
304
|
-
}
|
|
305
|
-
inline const SVFValue* getLockVal(CallSite cs) const
|
|
306
|
-
{
|
|
307
|
-
return getLockVal(cs.getInstruction());
|
|
308
|
-
}
|
|
265
|
+
const SVFValue* getLockVal(const ICFGNode *inst) const;
|
|
309
266
|
//@}
|
|
310
267
|
|
|
311
268
|
/// Return true if this call waits for a barrier
|
|
312
269
|
//@{
|
|
313
|
-
inline bool isTDBarWait(const
|
|
270
|
+
inline bool isTDBarWait(const ICFGNode *inst) const
|
|
314
271
|
{
|
|
315
272
|
return getType(getCallee(inst)) == TD_BAR_WAIT;
|
|
316
273
|
}
|
|
317
274
|
|
|
318
|
-
inline bool isTDBarWait(
|
|
275
|
+
inline bool isTDBarWait(const SVFInstruction* inst) const
|
|
319
276
|
{
|
|
320
|
-
return getType(getCallee(
|
|
277
|
+
return getType(getCallee(inst)) == TD_BAR_WAIT;
|
|
321
278
|
}
|
|
322
279
|
//@}
|
|
323
280
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -61,7 +61,7 @@ protected:
|
|
|
61
61
|
bool fromFile; ///< Whether the SVFIR is built according to user specified data from a txt file
|
|
62
62
|
NodeID nodeNumAfterPAGBuild; ///< initial node number after building SVFIR, excluding later added nodes, e.g., gepobj nodes
|
|
63
63
|
u32_t totalPTAPAGEdge;
|
|
64
|
-
ValueToEdgeMap valueToEdgeMap; ///< Map SVFValues (e.g.,
|
|
64
|
+
ValueToEdgeMap valueToEdgeMap; ///< Map SVFValues (e.g., ICFGNodes) to all corresponding PAGEdges
|
|
65
65
|
SymbolTableInfo* symInfo;
|
|
66
66
|
|
|
67
67
|
/// Add a node into the graph
|
|
@@ -163,8 +163,6 @@ class ThreadCallGraph: public CallGraph
|
|
|
163
163
|
public:
|
|
164
164
|
typedef Set<const CallICFGNode*> InstSet;
|
|
165
165
|
typedef InstSet CallSiteSet;
|
|
166
|
-
typedef std::vector<const SVFInstruction*> InstVector;
|
|
167
|
-
typedef Map<const SVFInstruction*, InstSet> CallToInstMap;
|
|
168
166
|
typedef Set<CallSiteSet*> CtxSet;
|
|
169
167
|
typedef ThreadForkEdge::ForkEdgeSet ForkEdgeSet;
|
|
170
168
|
typedef Map<const CallICFGNode*, ForkEdgeSet> CallInstToForkEdgesMap;
|
|
@@ -47,8 +47,6 @@ class MHP
|
|
|
47
47
|
|
|
48
48
|
public:
|
|
49
49
|
typedef Set<const SVFFunction*> FunSet;
|
|
50
|
-
typedef Set<const SVFInstruction*> InstSet;
|
|
51
|
-
typedef std::vector<const SVFInstruction*> InstVec;
|
|
52
50
|
typedef FIFOWorkList<CxtThreadStmt> CxtThreadStmtWorkList;
|
|
53
51
|
typedef Set<CxtThreadStmt> CxtThreadStmtSet;
|
|
54
52
|
typedef Map<CxtThreadStmt,NodeBS> ThreadStmtToThreadInterleav;
|
|
@@ -101,13 +101,9 @@ public:
|
|
|
101
101
|
{
|
|
102
102
|
return getType(fun) == CK_ALLOC;
|
|
103
103
|
}
|
|
104
|
-
inline bool isMemAlloc(const SVFInstruction* inst) const
|
|
105
|
-
{
|
|
106
|
-
return getType(SVFUtil::getCallee(inst)) == CK_ALLOC;
|
|
107
|
-
}
|
|
108
104
|
inline bool isMemAlloc(const CallICFGNode* cs) const
|
|
109
105
|
{
|
|
110
|
-
return isMemAlloc(cs->getCallSite());
|
|
106
|
+
return isMemAlloc(SVFUtil::getCallee(cs->getCallSite()));
|
|
111
107
|
}
|
|
112
108
|
//@}
|
|
113
109
|
|
|
@@ -117,13 +113,9 @@ public:
|
|
|
117
113
|
{
|
|
118
114
|
return getType(fun) == CK_FREE;
|
|
119
115
|
}
|
|
120
|
-
inline bool isMemDealloc(const SVFInstruction *inst) const
|
|
121
|
-
{
|
|
122
|
-
return getType(SVFUtil::getCallee(inst)) == CK_FREE;
|
|
123
|
-
}
|
|
124
116
|
inline bool isMemDealloc(const CallICFGNode* cs) const
|
|
125
117
|
{
|
|
126
|
-
return isMemDealloc(cs->getCallSite());
|
|
118
|
+
return isMemDealloc(SVFUtil::getCallee(cs->getCallSite()));
|
|
127
119
|
}
|
|
128
120
|
//@}
|
|
129
121
|
|
|
@@ -133,13 +125,9 @@ public:
|
|
|
133
125
|
{
|
|
134
126
|
return getType(fun) == CK_FOPEN;
|
|
135
127
|
}
|
|
136
|
-
inline bool isFOpen(const SVFInstruction* inst) const
|
|
137
|
-
{
|
|
138
|
-
return getType(SVFUtil::getCallee(inst)) == CK_FOPEN;
|
|
139
|
-
}
|
|
140
128
|
inline bool isFOpen(const CallICFGNode* cs) const
|
|
141
129
|
{
|
|
142
|
-
return isFOpen(cs->getCallSite());
|
|
130
|
+
return isFOpen(SVFUtil::getCallee(cs->getCallSite()));
|
|
143
131
|
}
|
|
144
132
|
//@}
|
|
145
133
|
|
|
@@ -149,13 +137,9 @@ public:
|
|
|
149
137
|
{
|
|
150
138
|
return getType(fun) == CK_FCLOSE;
|
|
151
139
|
}
|
|
152
|
-
inline bool isFClose(const SVFInstruction* inst) const
|
|
153
|
-
{
|
|
154
|
-
return getType(SVFUtil::getCallee(inst)) == CK_FCLOSE;
|
|
155
|
-
}
|
|
156
140
|
inline bool isFClose(const CallICFGNode* cs) const
|
|
157
141
|
{
|
|
158
|
-
return isFClose(cs->getCallSite());
|
|
142
|
+
return isFClose(SVFUtil::getCallee(cs->getCallSite()));
|
|
159
143
|
}
|
|
160
144
|
//@}
|
|
161
145
|
|
|
@@ -203,7 +203,7 @@ inline CallSite getSVFCallSite(const SVFInstruction* inst)
|
|
|
203
203
|
/// Match arguments for callsite at caller and callee
|
|
204
204
|
/// if the arg size does not match then we do not need to connect this parameter
|
|
205
205
|
/// unless the callee is a variadic function (the first parameter of variadic function is its parameter number)
|
|
206
|
-
bool matchArgs(const
|
|
206
|
+
bool matchArgs(const CallSite cs, const SVFFunction* callee);
|
|
207
207
|
|
|
208
208
|
/// Return LLVM callsite given a value
|
|
209
209
|
inline CallSite getSVFCallSite(const SVFValue* value)
|
|
@@ -466,11 +466,6 @@ inline int getHeapAllocHoldingArgPosition(const CallSite cs)
|
|
|
466
466
|
{
|
|
467
467
|
return getHeapAllocHoldingArgPosition(getCallee(cs));
|
|
468
468
|
}
|
|
469
|
-
|
|
470
|
-
inline int getHeapAllocHoldingArgPosition(const SVFInstruction *inst)
|
|
471
|
-
{
|
|
472
|
-
return getHeapAllocHoldingArgPosition(getCallee(inst));
|
|
473
|
-
}
|
|
474
469
|
//@}
|
|
475
470
|
|
|
476
471
|
inline bool isReallocExtCall(const CallSite cs)
|
|
@@ -478,12 +473,6 @@ inline bool isReallocExtCall(const CallSite cs)
|
|
|
478
473
|
bool isPtrTy = cs.getInstruction()->getType()->isPointerTy();
|
|
479
474
|
return isPtrTy && isReallocExtFun(getCallee(cs));
|
|
480
475
|
}
|
|
481
|
-
|
|
482
|
-
inline bool isReallocExtCall(const SVFInstruction *inst)
|
|
483
|
-
{
|
|
484
|
-
bool isPtrTy = inst->getType()->isPointerTy();
|
|
485
|
-
return isPtrTy && isReallocExtFun(getCallee(inst));
|
|
486
|
-
}
|
|
487
476
|
//@}
|
|
488
477
|
|
|
489
478
|
/// Return true if this is a thread creation call
|
|
@@ -504,10 +493,6 @@ inline bool isThreadJoinCall(const CallSite cs)
|
|
|
504
493
|
{
|
|
505
494
|
return ThreadAPI::getThreadAPI()->isTDJoin(cs.getInstruction());
|
|
506
495
|
}
|
|
507
|
-
inline bool isThreadJoinCall(const SVFInstruction *inst)
|
|
508
|
-
{
|
|
509
|
-
return ThreadAPI::getThreadAPI()->isTDJoin(inst);
|
|
510
|
-
}
|
|
511
496
|
//@}
|
|
512
497
|
|
|
513
498
|
/// Return true if this is a thread exit call
|
|
@@ -516,10 +501,6 @@ inline bool isThreadExitCall(const CallSite cs)
|
|
|
516
501
|
{
|
|
517
502
|
return ThreadAPI::getThreadAPI()->isTDExit(cs.getInstruction());
|
|
518
503
|
}
|
|
519
|
-
inline bool isThreadExitCall(const SVFInstruction *inst)
|
|
520
|
-
{
|
|
521
|
-
return ThreadAPI::getThreadAPI()->isTDExit(inst);
|
|
522
|
-
}
|
|
523
504
|
//@}
|
|
524
505
|
|
|
525
506
|
/// Return true if this is a lock acquire call
|
|
@@ -528,10 +509,6 @@ inline bool isLockAquireCall(const CallSite cs)
|
|
|
528
509
|
{
|
|
529
510
|
return ThreadAPI::getThreadAPI()->isTDAcquire(cs.getInstruction());
|
|
530
511
|
}
|
|
531
|
-
inline bool isLockAquireCall(const SVFInstruction *inst)
|
|
532
|
-
{
|
|
533
|
-
return ThreadAPI::getThreadAPI()->isTDAcquire(inst);
|
|
534
|
-
}
|
|
535
512
|
//@}
|
|
536
513
|
|
|
537
514
|
/// Return true if this is a lock acquire call
|
|
@@ -540,10 +517,6 @@ inline bool isLockReleaseCall(const CallSite cs)
|
|
|
540
517
|
{
|
|
541
518
|
return ThreadAPI::getThreadAPI()->isTDRelease(cs.getInstruction());
|
|
542
519
|
}
|
|
543
|
-
inline bool isLockReleaseCall(const SVFInstruction *inst)
|
|
544
|
-
{
|
|
545
|
-
return ThreadAPI::getThreadAPI()->isTDRelease(inst);
|
|
546
|
-
}
|
|
547
520
|
//@}
|
|
548
521
|
|
|
549
522
|
/// Return true if this is a barrier wait call
|
|
@@ -552,10 +525,6 @@ inline bool isBarrierWaitCall(const CallSite cs)
|
|
|
552
525
|
{
|
|
553
526
|
return ThreadAPI::getThreadAPI()->isTDBarWait(cs.getInstruction());
|
|
554
527
|
}
|
|
555
|
-
inline bool isBarrierWaitCall(const SVFInstruction *inst)
|
|
556
|
-
{
|
|
557
|
-
return ThreadAPI::getThreadAPI()->isTDBarWait(inst);
|
|
558
|
-
}
|
|
559
528
|
//@}
|
|
560
529
|
|
|
561
530
|
/// Return sole argument of the thread routine
|
|
@@ -564,10 +533,6 @@ inline const SVFValue* getActualParmAtForkSite(const CallSite cs)
|
|
|
564
533
|
{
|
|
565
534
|
return ThreadAPI::getThreadAPI()->getActualParmAtForkSite(cs.getInstruction());
|
|
566
535
|
}
|
|
567
|
-
inline const SVFValue* getActualParmAtForkSite(const SVFInstruction *inst)
|
|
568
|
-
{
|
|
569
|
-
return ThreadAPI::getThreadAPI()->getActualParmAtForkSite(inst);
|
|
570
|
-
}
|
|
571
536
|
//@}
|
|
572
537
|
|
|
573
538
|
|
|
@@ -576,10 +541,6 @@ inline bool isProgExitCall(const CallSite cs)
|
|
|
576
541
|
return isProgExitFunction(getCallee(cs));
|
|
577
542
|
}
|
|
578
543
|
|
|
579
|
-
inline bool isProgExitCall(const SVFInstruction *inst)
|
|
580
|
-
{
|
|
581
|
-
return isProgExitFunction(getCallee(inst));
|
|
582
|
-
}
|
|
583
544
|
|
|
584
545
|
template<typename T>
|
|
585
546
|
constexpr typename std::remove_reference<T>::type &&
|
|
Binary file
|
|
Binary file
|