svf-lib 1.0.1601 → 1.0.1603
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.
|
Binary file
|
|
Binary file
|
|
@@ -46,14 +46,14 @@ class SrcSnkSolver
|
|
|
46
46
|
|
|
47
47
|
public:
|
|
48
48
|
///Define the GTraits and node iterator
|
|
49
|
-
typedef SVF::
|
|
49
|
+
typedef SVF::GenericGraphTraits<GraphType> GTraits;
|
|
50
50
|
typedef typename GTraits::NodeType GNODE;
|
|
51
51
|
typedef typename GTraits::EdgeType GEDGE;
|
|
52
52
|
typedef typename GTraits::nodes_iterator node_iterator;
|
|
53
53
|
typedef typename GTraits::ChildIteratorType child_iterator;
|
|
54
54
|
|
|
55
55
|
/// Define inverse GTraits and note iterator
|
|
56
|
-
typedef SVF::
|
|
56
|
+
typedef SVF::GenericGraphTraits<SVF::Inverse<GNODE *> > InvGTraits;
|
|
57
57
|
typedef typename InvGTraits::ChildIteratorType inv_child_iterator;
|
|
58
58
|
|
|
59
59
|
/// Define worklist
|
|
@@ -83,7 +83,7 @@ public:
|
|
|
83
83
|
typedef std::vector<SVFBugEvent> EventStack;
|
|
84
84
|
|
|
85
85
|
public:
|
|
86
|
-
enum BugType {FULLBUFOVERFLOW, PARTIALBUFOVERFLOW, NEVERFREE, PARTIALLEAK, DOUBLEFREE, FILENEVERCLOSE, FILEPARTIALCLOSE};
|
|
86
|
+
enum BugType {FULLBUFOVERFLOW, PARTIALBUFOVERFLOW, NEVERFREE, PARTIALLEAK, DOUBLEFREE, FILENEVERCLOSE, FILEPARTIALCLOSE, FULLNULLPTRDEREFERENCE, PARTIALNULLPTRDEREFERENCE};
|
|
87
87
|
static const std::map<GenericBug::BugType, std::string> BugType2Str;
|
|
88
88
|
|
|
89
89
|
protected:
|
|
@@ -253,6 +253,38 @@ public:
|
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
+
class FullNullPtrDereferenceBug : public GenericBug
|
|
257
|
+
{
|
|
258
|
+
public:
|
|
259
|
+
FullNullPtrDereferenceBug(const EventStack &bugEventStack):
|
|
260
|
+
GenericBug(GenericBug::FULLNULLPTRDEREFERENCE, bugEventStack) { }
|
|
261
|
+
|
|
262
|
+
cJSON *getBugDescription() const;
|
|
263
|
+
void printBugToTerminal() const;
|
|
264
|
+
|
|
265
|
+
/// ClassOf
|
|
266
|
+
static inline bool classof(const GenericBug *bug)
|
|
267
|
+
{
|
|
268
|
+
return bug->getBugType() == GenericBug::FULLNULLPTRDEREFERENCE;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
class PartialNullPtrDereferenceBug : public GenericBug
|
|
273
|
+
{
|
|
274
|
+
public:
|
|
275
|
+
PartialNullPtrDereferenceBug(const EventStack &bugEventStack):
|
|
276
|
+
GenericBug(GenericBug::PARTIALNULLPTRDEREFERENCE, bugEventStack) { }
|
|
277
|
+
|
|
278
|
+
cJSON *getBugDescription() const;
|
|
279
|
+
void printBugToTerminal() const;
|
|
280
|
+
|
|
281
|
+
/// ClassOf
|
|
282
|
+
static inline bool classof(const GenericBug *bug)
|
|
283
|
+
{
|
|
284
|
+
return bug->getBugType() == GenericBug::PARTIALNULLPTRDEREFERENCE;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
256
288
|
class SVFBugReport
|
|
257
289
|
{
|
|
258
290
|
public:
|