27#ifndef SVF_BUGRECODER_H
28#define SVF_BUGRECODER_H
37#define BRANCHFLAGMASK 0x00000010
38#define EVENTTYPEMASK 0x0000000f
97 assert(
bugEventStack.size() != 0 &&
"bugEventStack should NOT be empty!");
107 const std::string
getLoc()
const;
352 assert(
false &&
"saber does NOT have this bug type!");
375 newBug =
new FullBufferOverflowBug(eventStack, allocLowerBound, allocUpperBound, accessLowerBound, accessUpperBound);
381 newBug =
new PartialBufferOverflowBug(eventStack, allocLowerBound, allocUpperBound, accessLowerBound, accessUpperBound);
399 assert(
false &&
"Abstract Execution does NOT have this bug type!");
A class representing a bounded 64-bit integer.
cJSON * getBugDescription() const
static bool classof(const GenericBug *bug)
ClassOf.
BoundedInt allocLowerBound
BufferOverflowBug(GenericBug::BugType bugType, const EventStack &eventStack, BoundedInt allocLowerBound, BoundedInt allocUpperBound, BoundedInt accessLowerBound, BoundedInt accessUpperBound)
BoundedInt accessUpperBound
void printBugToTerminal() const
BoundedInt allocUpperBound
BoundedInt accessLowerBound
static bool classof(const GenericBug *bug)
ClassOf.
cJSON * getBugDescription() const
DoubleFreeBug(const EventStack &bugEventStack)
void printBugToTerminal() const
cJSON * getBugDescription() const
static bool classof(const GenericBug *bug)
ClassOf.
FileNeverCloseBug(const EventStack &bugEventStack)
void printBugToTerminal() const
cJSON * getBugDescription() const
FilePartialCloseBug(const EventStack &bugEventStack)
void printBugToTerminal() const
static bool classof(const GenericBug *bug)
ClassOf.
FullBufferOverflowBug(const EventStack &eventStack, BoundedInt allocLowerBound, BoundedInt allocUpperBound, BoundedInt accessLowerBound, BoundedInt accessUpperBound)
static bool classof(const GenericBug *bug)
ClassOf.
static bool classof(const GenericBug *bug)
ClassOf.
cJSON * getBugDescription() const
FullNullPtrDereferenceBug(const EventStack &bugEventStack)
void printBugToTerminal() const
GenericBug(BugType bugType, const EventStack &bugEventStack)
note: should be initialized with a bugEventStack
static const OrderedMap< GenericBug::BugType, std::string > BugType2Str
const EventStack & getEventStack() const
BugType getBugType() const
returns bug type
virtual ~GenericBug()=default
@ PARTIALNULLPTRDEREFERENCE
virtual void printBugToTerminal() const =0
const std::string getLoc() const
returns bug location as json format string
const EventStack bugEventStack
std::vector< SVFBugEvent > EventStack
virtual cJSON * getBugDescription() const =0
const std::string getFuncName() const
return bug source function name
cJSON * getBugDescription() const
NeverFreeBug(const EventStack &bugEventStack)
static bool classof(const GenericBug *bug)
ClassOf.
void printBugToTerminal() const
static bool classof(const GenericBug *bug)
ClassOf.
PartialBufferOverflowBug(const EventStack &eventStack, BoundedInt allocLowerBound, BoundedInt allocUpperBound, BoundedInt accessLowerBound, BoundedInt accessUpperBound)
void printBugToTerminal() const
cJSON * getBugDescription() const
PartialLeakBug(const EventStack &bugEventStack)
static bool classof(const GenericBug *bug)
ClassOf.
static bool classof(const GenericBug *bug)
ClassOf.
cJSON * getBugDescription() const
void printBugToTerminal() const
PartialNullPtrDereferenceBug(const EventStack &bugEventStack)
virtual const std::string getEventLoc() const
virtual const std::string getEventDescription() const
SVFBugEvent(u32_t typeAndInfoFlag, const ICFGNode *eventInst)
u32_t getEventType() const
const ICFGNode * eventInst
virtual const std::string getFuncName() const
virtual ~SVFBugEvent()=default
const BugSet & getBugSet() const
SVF::Set< const GenericBug * > BugSet
void addAbsExecBug(GenericBug::BugType bugType, const GenericBug::EventStack &eventStack, BoundedInt allocLowerBound, BoundedInt allocUpperBound, BoundedInt accessLowerBound, BoundedInt accessUpperBound)
void setStat(double time, std::string mem, double coverage)
void dumpToJsonFile(const std::string &filePath) const
void addSaberBug(GenericBug::BugType bugType, const GenericBug::EventStack &eventStack)
std::map< Key, Value, Compare, Allocator > OrderedMap
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set