Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::FullNullPtrDereferenceBug Class Reference

#include <SVFBugReport.h>

Inheritance diagram for SVF::FullNullPtrDereferenceBug:
SVF::GenericBug

Public Member Functions

 FullNullPtrDereferenceBug (const EventStack &bugEventStack)
cJSON * getBugDescription () const
void printBugToTerminal () const
Public Member Functions inherited from SVF::GenericBug
 GenericBug (BugType bugType, const EventStack &bugEventStack)
 note: should be initialized with a bugEventStack
virtual ~GenericBug ()=default
BugType getBugType () const
 returns bug type
const std::string getLoc () const
 returns bug location as json format string
const std::string getFuncName () const
 return bug source function name
const EventStack & getEventStack () const

Static Public Member Functions

static bool classof (const GenericBug *bug)
 ClassOf.

Additional Inherited Members

Public Types inherited from SVF::GenericBug
enum  BugType {
  FULLBUFOVERFLOW , PARTIALBUFOVERFLOW , NEVERFREE , PARTIALLEAK ,
  DOUBLEFREE , FILENEVERCLOSE , FILEPARTIALCLOSE , FULLNULLPTRDEREFERENCE ,
  PARTIALNULLPTRDEREFERENCE
}
typedef std::vector< SVFBugEvent > EventStack
Static Public Attributes inherited from SVF::GenericBug
static const OrderedMap< GenericBug::BugType, std::string > BugType2Str
Protected Attributes inherited from SVF::GenericBug
BugType bugType
const EventStack bugEventStack

Detailed Description

Definition at line 254 of file SVFBugReport.h.

Constructor & Destructor Documentation

◆ FullNullPtrDereferenceBug()

SVF::FullNullPtrDereferenceBug::FullNullPtrDereferenceBug ( const EventStack & bugEventStack)
inline

Definition at line 257 of file SVFBugReport.h.

257 :
GenericBug(BugType bugType, const EventStack &bugEventStack)
note: should be initialized with a bugEventStack
const EventStack bugEventStack

Member Function Documentation

◆ classof()

bool SVF::FullNullPtrDereferenceBug::classof ( const GenericBug * bug)
inlinestatic

ClassOf.

Definition at line 264 of file SVFBugReport.h.

265 {
266 return bug->getBugType() == GenericBug::FULLNULLPTRDEREFERENCE;
267 }

◆ getBugDescription()

cJSON * FullNullPtrDereferenceBug::getBugDescription ( ) const
virtual

Implements SVF::GenericBug.

Definition at line 257 of file SVFBugReport.cpp.

258{
259 cJSON *bugDescription = cJSON_CreateObject();
260 return bugDescription;
261}
struct cJSON cJSON

◆ printBugToTerminal()

void FullNullPtrDereferenceBug::printBugToTerminal ( ) const
virtual

Implements SVF::GenericBug.

Definition at line 263 of file SVFBugReport.cpp.

264{
265 SVFUtil::errs() << SVFUtil::bugMsg2("\t FullNullPtrDereference :") << " dereference at : ("
266 << GenericBug::getLoc() << ")\n";
267}
const std::string getLoc() const
returns bug location as json format string
std::ostream & errs()
Overwrite llvm::errs().
Definition SVFUtil.h:64
std::string bugMsg2(const std::string &msg)
Definition SVFUtil.cpp:108

The documentation for this class was generated from the following files: