svf-lib 1.0.1862 → 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/SVF-osx/svf/include/Graphs/CHG.h +2 -2
- package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
- package/SVF-osx/svf/include/Util/Casting.h +1 -1
- package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
- package/SVF-osx/svf/include/Util/iterator.h +2 -2
- 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)
|
|
@@ -350,8 +350,8 @@ struct GenericGraphTraits<SVF::CHNode*>
|
|
|
350
350
|
/// for inverse traversal.
|
|
351
351
|
template <>
|
|
352
352
|
struct GenericGraphTraits<Inverse<SVF::CHNode*>>
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
: public GenericGraphTraits<
|
|
354
|
+
Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
|
|
355
355
|
{
|
|
356
356
|
};
|
|
357
357
|
|
|
@@ -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
|
-
inverse_nodes(const GraphType &G)
|
|
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
|
-
inverse_children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
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));
|
|
@@ -382,7 +382,7 @@ inline typename cast_retty<X, Y *>::ret_type cast(Y *Val)
|
|
|
382
382
|
|
|
383
383
|
template <class X, class Y>
|
|
384
384
|
inline typename cast_retty<X, std::unique_ptr<Y>>::ret_type
|
|
385
|
-
cast(std::unique_ptr<Y> &&Val)
|
|
385
|
+
cast(std::unique_ptr<Y> &&Val)
|
|
386
386
|
{
|
|
387
387
|
assert(SVFUtil::isa<X>(Val.get()) && "cast<Ty>() argument of incompatible type!");
|
|
388
388
|
using ret_type = typename cast_retty<X, std::unique_ptr<Y>>::ret_type;
|
|
@@ -192,8 +192,8 @@ public:
|
|
|
192
192
|
|
|
193
193
|
// From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences).
|
|
194
194
|
static inline std::pair<hclust_fast_methods, std::vector<NodeID>> determineBestMapping(
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
196
|
+
Map<PointsTo, unsigned> pointsToSets, const std::string &evalSubtitle, double &evalTime);
|
|
197
197
|
|
|
198
198
|
};
|
|
199
199
|
};
|
|
@@ -352,7 +352,7 @@ struct pointee_iter
|
|
|
352
352
|
template <typename RangeT, typename WrappedIteratorT =
|
|
353
353
|
decltype(std::begin(std::declval<RangeT>()))>
|
|
354
354
|
iter_range<pointee_iter<WrappedIteratorT>>
|
|
355
|
-
make_pointee_range(RangeT &&Range)
|
|
355
|
+
make_pointee_range(RangeT &&Range)
|
|
356
356
|
{
|
|
357
357
|
using PointeeIteratorT = pointee_iter<WrappedIteratorT>;
|
|
358
358
|
return make_range(PointeeIteratorT(std::begin(std::forward<RangeT>(Range))),
|
|
@@ -388,7 +388,7 @@ public:
|
|
|
388
388
|
template <typename RangeT, typename WrappedIteratorT =
|
|
389
389
|
decltype(std::begin(std::declval<RangeT>()))>
|
|
390
390
|
iter_range<pointer_iterator<WrappedIteratorT>>
|
|
391
|
-
make_pointer_range(RangeT &&Range)
|
|
391
|
+
make_pointer_range(RangeT &&Range)
|
|
392
392
|
{
|
|
393
393
|
using PointerIteratorT = pointer_iterator<WrappedIteratorT>;
|
|
394
394
|
return make_range(PointerIteratorT(std::begin(std::forward<RangeT>(Range))),
|