svf-lib 1.0.1863 → 1.0.1864
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-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AE/Svfexe/{AE.h → AbstractExecution.h} +13 -14
- package/SVF-osx/svf/include/AE/Svfexe/BufOverflowChecker.h +5 -5
- package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +0 -43
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
|
|
36
36
|
namespace SVF
|
|
37
37
|
{
|
|
38
|
-
class
|
|
38
|
+
class AbstractExecution;
|
|
39
39
|
class AEStat;
|
|
40
40
|
class AEAPI;
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
enum class AEKind
|
|
44
44
|
{
|
|
45
|
-
|
|
45
|
+
AbstractExecution,
|
|
46
46
|
BufOverflowChecker
|
|
47
47
|
};
|
|
48
48
|
|
|
@@ -51,7 +51,7 @@ class AEStat : public SVFStat
|
|
|
51
51
|
{
|
|
52
52
|
public:
|
|
53
53
|
void countStateSize();
|
|
54
|
-
AEStat(
|
|
54
|
+
AEStat(AbstractExecution *ae): _ae(ae)
|
|
55
55
|
{
|
|
56
56
|
startTime = getClk(true);
|
|
57
57
|
}
|
|
@@ -69,7 +69,7 @@ public:
|
|
|
69
69
|
void reportBug();
|
|
70
70
|
|
|
71
71
|
public:
|
|
72
|
-
|
|
72
|
+
AbstractExecution *_ae;
|
|
73
73
|
s32_t count{0};
|
|
74
74
|
std::string memory_usage;
|
|
75
75
|
std::string memUsage;
|
|
@@ -103,8 +103,7 @@ public:
|
|
|
103
103
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
class AE
|
|
106
|
+
class AbstractExecution
|
|
108
107
|
{
|
|
109
108
|
friend class AEStat;
|
|
110
109
|
friend class AEAPI;
|
|
@@ -112,7 +111,7 @@ class AE
|
|
|
112
111
|
public:
|
|
113
112
|
typedef SCCDetection<PTACallGraph *> CallGraphSCC;
|
|
114
113
|
/// Constructor
|
|
115
|
-
|
|
114
|
+
AbstractExecution();
|
|
116
115
|
|
|
117
116
|
virtual void initExtAPI();
|
|
118
117
|
|
|
@@ -120,14 +119,14 @@ public:
|
|
|
120
119
|
|
|
121
120
|
|
|
122
121
|
/// Destructor
|
|
123
|
-
virtual ~
|
|
122
|
+
virtual ~AbstractExecution();
|
|
124
123
|
|
|
125
124
|
/// Program entry
|
|
126
125
|
void analyse();
|
|
127
126
|
|
|
128
|
-
static bool classof(const
|
|
127
|
+
static bool classof(const AbstractExecution* ae)
|
|
129
128
|
{
|
|
130
|
-
return ae->getKind() == AEKind::
|
|
129
|
+
return ae->getKind() == AEKind::AbstractExecution;
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
AEKind getKind() const
|
|
@@ -286,7 +285,7 @@ public:
|
|
|
286
285
|
enum ExtAPIType { UNCLASSIFIED, MEMCPY, MEMSET, STRCPY, STRCAT };
|
|
287
286
|
static bool classof(const AEAPI* api)
|
|
288
287
|
{
|
|
289
|
-
return api->getKind() == AEKind::
|
|
288
|
+
return api->getKind() == AEKind::AbstractExecution;
|
|
290
289
|
}
|
|
291
290
|
|
|
292
291
|
/**
|
|
@@ -295,10 +294,10 @@ public:
|
|
|
295
294
|
* @param ae Abstract Execution or its subclass
|
|
296
295
|
* @param stat AEStat
|
|
297
296
|
*/
|
|
298
|
-
AEAPI(
|
|
297
|
+
AEAPI(AbstractExecution* ae, AEStat* stat): _ae(ae), _stat(stat)
|
|
299
298
|
{
|
|
300
299
|
initExtFunMap();
|
|
301
|
-
_kind = AEKind::
|
|
300
|
+
_kind = AEKind::AbstractExecution;
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
virtual ~AEAPI() {}
|
|
@@ -421,7 +420,7 @@ protected:
|
|
|
421
420
|
|
|
422
421
|
|
|
423
422
|
protected:
|
|
424
|
-
|
|
423
|
+
AbstractExecution* _ae;
|
|
425
424
|
AEStat* _stat;
|
|
426
425
|
SVFIR* _svfir;
|
|
427
426
|
AEKind _kind;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
// Created by Jiawei Wang on 2024/1/12.
|
|
26
26
|
//
|
|
27
27
|
|
|
28
|
-
#include "AE.h"
|
|
28
|
+
#include "AE/Svfexe/AbstractExecution.h"
|
|
29
29
|
|
|
30
30
|
namespace SVF
|
|
31
31
|
{
|
|
@@ -101,7 +101,7 @@ class BufOverflowCheckerAPI: public AEAPI
|
|
|
101
101
|
{
|
|
102
102
|
public:
|
|
103
103
|
BufOverflowCheckerAPI() = delete;
|
|
104
|
-
BufOverflowCheckerAPI(
|
|
104
|
+
BufOverflowCheckerAPI(AbstractExecution * ae, AEStat * stat): AEAPI(ae, stat)
|
|
105
105
|
{
|
|
106
106
|
initExtFunMap();
|
|
107
107
|
initExtAPIBufOverflowCheckRules();
|
|
@@ -167,17 +167,17 @@ public:
|
|
|
167
167
|
Map<std::string, std::vector<std::pair<u32_t, u32_t>>> _extAPIBufOverflowCheckRules;
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
class BufOverflowChecker: public
|
|
170
|
+
class BufOverflowChecker: public AbstractExecution
|
|
171
171
|
{
|
|
172
172
|
friend BufOverflowCheckerAPI;
|
|
173
173
|
|
|
174
174
|
public:
|
|
175
|
-
BufOverflowChecker() :
|
|
175
|
+
BufOverflowChecker() : AbstractExecution()
|
|
176
176
|
{
|
|
177
177
|
_kind = AEKind::BufOverflowChecker;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
static bool classof(const
|
|
180
|
+
static bool classof(const AbstractExecution* ae)
|
|
181
181
|
{
|
|
182
182
|
return ae->getKind() == AEKind::BufOverflowChecker;
|
|
183
183
|
}
|
|
@@ -258,49 +258,6 @@ public:
|
|
|
258
258
|
}
|
|
259
259
|
//@}
|
|
260
260
|
|
|
261
|
-
/// Iterators used for SCC detection, overwrite it in child class if necessory
|
|
262
|
-
//@{
|
|
263
|
-
virtual inline iterator directOutEdgeBegin()
|
|
264
|
-
{
|
|
265
|
-
return OutEdges.begin();
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
virtual inline iterator directOutEdgeEnd()
|
|
269
|
-
{
|
|
270
|
-
return OutEdges.end();
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
virtual inline iterator directInEdgeBegin()
|
|
274
|
-
{
|
|
275
|
-
return InEdges.begin();
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
virtual inline iterator directInEdgeEnd()
|
|
279
|
-
{
|
|
280
|
-
return InEdges.end();
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
virtual inline const_iterator directOutEdgeBegin() const
|
|
284
|
-
{
|
|
285
|
-
return OutEdges.begin();
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
virtual inline const_iterator directOutEdgeEnd() const
|
|
289
|
-
{
|
|
290
|
-
return OutEdges.end();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
virtual inline const_iterator directInEdgeBegin() const
|
|
294
|
-
{
|
|
295
|
-
return InEdges.begin();
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
virtual inline const_iterator directInEdgeEnd() const
|
|
299
|
-
{
|
|
300
|
-
return InEdges.end();
|
|
301
|
-
}
|
|
302
|
-
//@}
|
|
303
|
-
|
|
304
261
|
/// Add incoming and outgoing edges
|
|
305
262
|
//@{
|
|
306
263
|
inline bool addIncomingEdge(CFBasicBlockEdge *inEdge)
|