27 #ifndef SVF_BUGRECODER_H
28 #define SVF_BUGRECODER_H
40 #define BRANCHFLAGMASK 0x00000010
41 #define EVENTTYPEMASK 0x0000000f
87 static const std::map<GenericBug::BugType, std::string>
BugType2Str;
98 assert(
bugEventStack.size() != 0 &&
"bugEventStack should NOT be empty!");
353 assert(
false &&
"saber does NOT have this bug type!");
376 newBug =
new FullBufferOverflowBug(eventStack, allocLowerBound, allocUpperBound, accessLowerBound, accessUpperBound);
382 newBug =
new PartialBufferOverflowBug(eventStack, allocLowerBound, allocUpperBound, accessLowerBound, accessUpperBound);
400 assert(
false &&
"Abstract Execution does NOT have this bug type!");
cJSON * getBugDescription() const
static bool classof(const GenericBug *bug)
ClassOf.
BufferOverflowBug(GenericBug::BugType bugType, const EventStack &eventStack, s64_t allocLowerBound, s64_t allocUpperBound, s64_t accessLowerBound, s64_t accessUpperBound)
void printBugToTerminal() const
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.
static bool classof(const GenericBug *bug)
ClassOf.
FullBufferOverflowBug(const EventStack &eventStack, s64_t allocLowerBound, s64_t allocUpperBound, s64_t accessLowerBound, s64_t accessUpperBound)
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 std::map< GenericBug::BugType, std::string > BugType2Str
BugType getBugType() const
returns bug type
virtual ~GenericBug()=default
@ PARTIALNULLPTRDEREFERENCE
const EventStack & getEventStack() const
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
PartialBufferOverflowBug(const EventStack &eventStack, s64_t allocLowerBound, s64_t allocUpperBound, s64_t accessLowerBound, s64_t accessUpperBound)
static bool classof(const GenericBug *bug)
ClassOf.
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
void addAbsExecBug(GenericBug::BugType bugType, const GenericBug::EventStack &eventStack, s64_t allocLowerBound, s64_t allocUpperBound, s64_t accessLowerBound, s64_t accessUpperBound)
SVF::Set< const GenericBug * > BugSet
const BugSet & getBugSet() const
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)
llvm::Loop Loop
LLVM Loop.
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set