svf-lib 1.0.1942 → 1.0.1944
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/include/AE/Svfexe/AbstractInterpretation.h +12 -12
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/include/AE/Svfexe/AbstractInterpretation.h +12 -12
- 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
|
Binary file
|
|
@@ -154,7 +154,7 @@ protected:
|
|
|
154
154
|
* @param intraEdge the edge from CmpStmt to the next node
|
|
155
155
|
* @return if this edge is feasible
|
|
156
156
|
*/
|
|
157
|
-
bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState&
|
|
157
|
+
bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState& as);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* handle instructions in ICFGNode
|
|
@@ -214,7 +214,7 @@ protected:
|
|
|
214
214
|
* @return if this ICFGNode has preceding execution state
|
|
215
215
|
*/
|
|
216
216
|
bool isCmpBranchFeasible(const CmpStmt* cmpStmt, s64_t succ,
|
|
217
|
-
AbstractState&
|
|
217
|
+
AbstractState& as);
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Check if this SwitchInst and succ are satisfiable to the execution state.
|
|
@@ -224,7 +224,7 @@ protected:
|
|
|
224
224
|
* @return if this ICFGNode has preceding execution state
|
|
225
225
|
*/
|
|
226
226
|
bool isSwitchBranchFeasible(const SVFVar* var, s64_t succ,
|
|
227
|
-
AbstractState&
|
|
227
|
+
AbstractState& as);
|
|
228
228
|
|
|
229
229
|
|
|
230
230
|
/**
|
|
@@ -248,7 +248,7 @@ protected:
|
|
|
248
248
|
* @param addr Address Stmt like malloc/calloc/ALLOCA/StackAlloc
|
|
249
249
|
* @return the byte size e.g. int32_t a[10] -> return 40
|
|
250
250
|
*/
|
|
251
|
-
u32_t getAllocaInstByteSize(AbstractState&
|
|
251
|
+
u32_t getAllocaInstByteSize(AbstractState& as, const AddrStmt *addr);
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* get byte size of alloca inst
|
|
@@ -257,7 +257,7 @@ protected:
|
|
|
257
257
|
* @param rhs SVFValue of string
|
|
258
258
|
* @return the string
|
|
259
259
|
*/
|
|
260
|
-
std::string strRead(AbstractState&
|
|
260
|
+
std::string strRead(AbstractState& as,const SVFValue* rhs);
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* get length of string
|
|
@@ -266,7 +266,7 @@ protected:
|
|
|
266
266
|
* @param strValue SVFValue of string
|
|
267
267
|
* @return AbstractValue of string length
|
|
268
268
|
*/
|
|
269
|
-
AbstractValue getStrlen(AbstractState&
|
|
269
|
+
AbstractValue getStrlen(AbstractState& as, const SVF::SVFValue *strValue);
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* get memory allocation size
|
|
@@ -277,7 +277,7 @@ protected:
|
|
|
277
277
|
* @param value to be traced
|
|
278
278
|
* @return AbstractValue of allocation size
|
|
279
279
|
*/
|
|
280
|
-
AbstractValue traceMemoryAllocationSize(AbstractState&
|
|
280
|
+
AbstractValue traceMemoryAllocationSize(AbstractState& as, const SVFValue *value);
|
|
281
281
|
/**
|
|
282
282
|
* execute strcpy in abstract execution
|
|
283
283
|
* e.g arr = new char[10]
|
|
@@ -304,7 +304,7 @@ protected:
|
|
|
304
304
|
* we can set arr[3]='d', arr[4]='e', arr[5]='\0'
|
|
305
305
|
* @param call callnode of memcpy like api
|
|
306
306
|
*/
|
|
307
|
-
virtual void handleMemcpy(AbstractState&
|
|
307
|
+
virtual void handleMemcpy(AbstractState& as, const SVFValue* dst, const SVFValue* src, AbstractValue len, u32_t start_idx);
|
|
308
308
|
/**
|
|
309
309
|
* execute memset in abstract execution
|
|
310
310
|
* e.g arr = new char[10]
|
|
@@ -312,7 +312,7 @@ protected:
|
|
|
312
312
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
313
313
|
* @param call callnode of memset like api
|
|
314
314
|
*/
|
|
315
|
-
virtual void handleMemset(AbstractState&
|
|
315
|
+
virtual void handleMemset(AbstractState& as, const SVFValue* dst, AbstractValue elem, AbstractValue len);
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
318
|
* if this NodeID in SVFIR is a pointer, get the pointee type
|
|
@@ -321,14 +321,14 @@ protected:
|
|
|
321
321
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
322
322
|
* @param call callnode of memset like api
|
|
323
323
|
*/
|
|
324
|
-
const SVFType* getPointeeElement(AbstractState&
|
|
324
|
+
const SVFType* getPointeeElement(AbstractState& as, NodeID id);
|
|
325
325
|
|
|
326
326
|
void collectCheckPoint();
|
|
327
327
|
void checkPointAllSet();
|
|
328
328
|
// helper functions for traceMemoryAllocationSize and canSafelyAccessMemory
|
|
329
329
|
void AccessMemoryViaRetNode(const CallICFGNode *callnode, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
330
330
|
void AccessMemoryViaCopyStmt(const CopyStmt *copy, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
331
|
-
void AccessMemoryViaLoadStmt(AbstractState&
|
|
331
|
+
void AccessMemoryViaLoadStmt(AbstractState& as, const LoadStmt *load, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
332
332
|
void AccessMemoryViaCallArgs(const SVF::SVFArgument *arg, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
333
333
|
|
|
334
334
|
|
|
@@ -369,7 +369,7 @@ protected:
|
|
|
369
369
|
bool narrowFixpointPass(const ICFGNode* cycle_head,
|
|
370
370
|
AbstractState& pre_es);
|
|
371
371
|
|
|
372
|
-
AbstractState&
|
|
372
|
+
AbstractState& getAbsState(const ICFGNode* node)
|
|
373
373
|
{
|
|
374
374
|
const ICFGNode* repNode = _icfg->getRepNode(node);
|
|
375
375
|
if (_postAbsTrace.count(repNode) == 0)
|
|
Binary file
|
|
Binary file
|
|
@@ -154,7 +154,7 @@ protected:
|
|
|
154
154
|
* @param intraEdge the edge from CmpStmt to the next node
|
|
155
155
|
* @return if this edge is feasible
|
|
156
156
|
*/
|
|
157
|
-
bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState&
|
|
157
|
+
bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState& as);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* handle instructions in ICFGNode
|
|
@@ -214,7 +214,7 @@ protected:
|
|
|
214
214
|
* @return if this ICFGNode has preceding execution state
|
|
215
215
|
*/
|
|
216
216
|
bool isCmpBranchFeasible(const CmpStmt* cmpStmt, s64_t succ,
|
|
217
|
-
AbstractState&
|
|
217
|
+
AbstractState& as);
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Check if this SwitchInst and succ are satisfiable to the execution state.
|
|
@@ -224,7 +224,7 @@ protected:
|
|
|
224
224
|
* @return if this ICFGNode has preceding execution state
|
|
225
225
|
*/
|
|
226
226
|
bool isSwitchBranchFeasible(const SVFVar* var, s64_t succ,
|
|
227
|
-
AbstractState&
|
|
227
|
+
AbstractState& as);
|
|
228
228
|
|
|
229
229
|
|
|
230
230
|
/**
|
|
@@ -248,7 +248,7 @@ protected:
|
|
|
248
248
|
* @param addr Address Stmt like malloc/calloc/ALLOCA/StackAlloc
|
|
249
249
|
* @return the byte size e.g. int32_t a[10] -> return 40
|
|
250
250
|
*/
|
|
251
|
-
u32_t getAllocaInstByteSize(AbstractState&
|
|
251
|
+
u32_t getAllocaInstByteSize(AbstractState& as, const AddrStmt *addr);
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* get byte size of alloca inst
|
|
@@ -257,7 +257,7 @@ protected:
|
|
|
257
257
|
* @param rhs SVFValue of string
|
|
258
258
|
* @return the string
|
|
259
259
|
*/
|
|
260
|
-
std::string strRead(AbstractState&
|
|
260
|
+
std::string strRead(AbstractState& as,const SVFValue* rhs);
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* get length of string
|
|
@@ -266,7 +266,7 @@ protected:
|
|
|
266
266
|
* @param strValue SVFValue of string
|
|
267
267
|
* @return AbstractValue of string length
|
|
268
268
|
*/
|
|
269
|
-
AbstractValue getStrlen(AbstractState&
|
|
269
|
+
AbstractValue getStrlen(AbstractState& as, const SVF::SVFValue *strValue);
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* get memory allocation size
|
|
@@ -277,7 +277,7 @@ protected:
|
|
|
277
277
|
* @param value to be traced
|
|
278
278
|
* @return AbstractValue of allocation size
|
|
279
279
|
*/
|
|
280
|
-
AbstractValue traceMemoryAllocationSize(AbstractState&
|
|
280
|
+
AbstractValue traceMemoryAllocationSize(AbstractState& as, const SVFValue *value);
|
|
281
281
|
/**
|
|
282
282
|
* execute strcpy in abstract execution
|
|
283
283
|
* e.g arr = new char[10]
|
|
@@ -304,7 +304,7 @@ protected:
|
|
|
304
304
|
* we can set arr[3]='d', arr[4]='e', arr[5]='\0'
|
|
305
305
|
* @param call callnode of memcpy like api
|
|
306
306
|
*/
|
|
307
|
-
virtual void handleMemcpy(AbstractState&
|
|
307
|
+
virtual void handleMemcpy(AbstractState& as, const SVFValue* dst, const SVFValue* src, AbstractValue len, u32_t start_idx);
|
|
308
308
|
/**
|
|
309
309
|
* execute memset in abstract execution
|
|
310
310
|
* e.g arr = new char[10]
|
|
@@ -312,7 +312,7 @@ protected:
|
|
|
312
312
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
313
313
|
* @param call callnode of memset like api
|
|
314
314
|
*/
|
|
315
|
-
virtual void handleMemset(AbstractState&
|
|
315
|
+
virtual void handleMemset(AbstractState& as, const SVFValue* dst, AbstractValue elem, AbstractValue len);
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
318
|
* if this NodeID in SVFIR is a pointer, get the pointee type
|
|
@@ -321,14 +321,14 @@ protected:
|
|
|
321
321
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
322
322
|
* @param call callnode of memset like api
|
|
323
323
|
*/
|
|
324
|
-
const SVFType* getPointeeElement(AbstractState&
|
|
324
|
+
const SVFType* getPointeeElement(AbstractState& as, NodeID id);
|
|
325
325
|
|
|
326
326
|
void collectCheckPoint();
|
|
327
327
|
void checkPointAllSet();
|
|
328
328
|
// helper functions for traceMemoryAllocationSize and canSafelyAccessMemory
|
|
329
329
|
void AccessMemoryViaRetNode(const CallICFGNode *callnode, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
330
330
|
void AccessMemoryViaCopyStmt(const CopyStmt *copy, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
331
|
-
void AccessMemoryViaLoadStmt(AbstractState&
|
|
331
|
+
void AccessMemoryViaLoadStmt(AbstractState& as, const LoadStmt *load, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
332
332
|
void AccessMemoryViaCallArgs(const SVF::SVFArgument *arg, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
333
333
|
|
|
334
334
|
|
|
@@ -369,7 +369,7 @@ protected:
|
|
|
369
369
|
bool narrowFixpointPass(const ICFGNode* cycle_head,
|
|
370
370
|
AbstractState& pre_es);
|
|
371
371
|
|
|
372
|
-
AbstractState&
|
|
372
|
+
AbstractState& getAbsState(const ICFGNode* node)
|
|
373
373
|
{
|
|
374
374
|
const ICFGNode* repNode = _icfg->getRepNode(node);
|
|
375
375
|
if (_postAbsTrace.count(repNode) == 0)
|
|
Binary file
|
|
Binary file
|