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;
108 const std::string
getLoc()
const;
353 assert(
false &&
"saber does NOT have this bug type!");
359 newBug->printBugToTerminal();
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
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
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
const BugSet & getBugSet() const
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
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::IRBuilder IRBuilder
llvm::Loop Loop
LLVM Loop.