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

#include <SVFBugReport.h>

Inheritance diagram for SVF::PartialNullPtrDereferenceBug:
SVF::GenericBug

Public Member Functions

 PartialNullPtrDereferenceBug (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 270 of file SVFBugReport.h.

Constructor & Destructor Documentation

◆ PartialNullPtrDereferenceBug()

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

Definition at line 273 of file SVFBugReport.h.

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

Member Function Documentation

◆ classof()

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

ClassOf.

Definition at line 280 of file SVFBugReport.h.

281 {
282 return bug->getBugType() == GenericBug::PARTIALNULLPTRDEREFERENCE;
283 }

◆ getBugDescription()

cJSON * PartialNullPtrDereferenceBug::getBugDescription ( ) const
virtual

Implements SVF::GenericBug.

Definition at line 269 of file SVFBugReport.cpp.

270{
271 cJSON *bugDescription = cJSON_CreateObject();
272 return bugDescription;
273}
struct cJSON cJSON

◆ printBugToTerminal()

void PartialNullPtrDereferenceBug::printBugToTerminal ( ) const
virtual

Implements SVF::GenericBug.

Definition at line 275 of file SVFBugReport.cpp.

276{
277 SVFUtil::errs() << SVFUtil::bugMsg2("\t PartialNullPtrDereference :") << " dereference at : ("
278 << GenericBug::getLoc() << ")\n";
279}
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: