Static Value-Flow Analysis
|
#include <FileChecker.h>
Public Member Functions | |
FileChecker () | |
Constructor. More... | |
virtual | ~FileChecker () |
Destructor. More... | |
virtual bool | runOnModule (SVFIR *pag) |
We start from here. More... | |
bool | isSourceLikeFun (const SVFFunction *fun) |
Whether the function is a heap allocator/reallocator (allocate memory) More... | |
bool | isSinkLikeFun (const SVFFunction *fun) |
Whether the function is a heap deallocator (free/release memory) More... | |
void | reportBug (ProgSlice *slice) |
Report file/close bugs. More... | |
Public Member Functions inherited from SVF::LeakChecker | |
LeakChecker () | |
Constructor. More... | |
virtual | ~LeakChecker () |
Destructor. More... | |
virtual void | initSrcs () override |
Initialize sources and sinks. More... | |
virtual void | initSnks () override |
Public Member Functions inherited from SVF::SrcSnkDDA | |
SrcSnkDDA () | |
Bug Reporter. More... | |
~SrcSnkDDA () override | |
Destructor. More... | |
virtual void | analyze (SVFModule *module) |
Start analysis here. More... | |
virtual void | initialize (SVFModule *module) |
Initialize analysis. More... | |
virtual void | finalize () |
Finalize analysis. More... | |
SVFIR * | getPAG () const |
Get SVFIR. More... | |
const SVFG * | getSVFG () const |
Get SVFG. More... | |
PTACallGraph * | getCallgraph () const |
Get Callgraph. More... | |
bool | isGlobalSVFGNode (const SVFGNode *node) const |
Whether this svfg node may access global variable. More... | |
virtual void | setCurSlice (const SVFGNode *src) |
Slice operations. More... | |
ProgSlice * | getCurSlice () const |
void | addSinkToCurSlice (const SVFGNode *node) |
bool | isInCurForwardSlice (const SVFGNode *node) |
bool | isInCurBackwardSlice (const SVFGNode *node) |
void | addToCurForwardSlice (const SVFGNode *node) |
void | addToCurBackwardSlice (const SVFGNode *node) |
bool | isInAWrapper (const SVFGNode *src, CallSiteSet &csIdSet) |
Identify allocation wrappers. More... | |
const SVFGNodeSet & | getSources () const |
Get sources/sinks. More... | |
SVFGNodeSetIter | sourcesBegin () const |
SVFGNodeSetIter | sourcesEnd () const |
void | addToSources (const SVFGNode *node) |
const SVFGNodeSet & | getSinks () const |
SVFGNodeSetIter | sinksBegin () const |
SVFGNodeSetIter | sinksEnd () const |
void | addToSinks (const SVFGNode *node) |
SaberCondAllocator * | getSaberCondAllocator () const |
Get saber condition allocator. More... | |
const SVFBugReport & | getBugReport () const |
bool | isSource (const SVFGNode *node) const |
bool | isSink (const SVFGNode *node) const |
Additional Inherited Members | |
Public Types inherited from SVF::LeakChecker | |
enum | LEAK_TYPE { NEVER_FREE_LEAK , CONTEXT_LEAK , PATH_LEAK , GLOBAL_LEAK } |
typedef Map< const SVFGNode *, const CallICFGNode * > | SVFGNodeToCSIDMap |
typedef FIFOWorkList< const CallICFGNode * > | CSWorkList |
typedef ProgSlice::VFWorkList | WorkList |
typedef NodeBS | SVFGNodeBS |
Public Types inherited from SVF::SrcSnkDDA | |
typedef ProgSlice::SVFGNodeSet | SVFGNodeSet |
typedef Map< const SVFGNode *, ProgSlice * > | SVFGNodeToSliceMap |
typedef SVFGNodeSet::const_iterator | SVFGNodeSetIter |
typedef CxtDPItem | DPIm |
typedef Set< DPIm > | DPImSet |
dpitem set More... | |
typedef Map< const SVFGNode *, DPImSet > | SVFGNodeToDPItemsMap |
map a SVFGNode to its visited dpitems More... | |
typedef Set< const CallICFGNode * > | CallSiteSet |
typedef NodeBS | SVFGNodeBS |
typedef ProgSlice::VFWorkList | WorkList |
Public Types inherited from SVF::GraphReachSolver< GraphType, DPIm > | |
typedef SVF::GenericGraphTraits< GraphType > | GTraits |
Define the GTraits and node iterator. More... | |
typedef GTraits::NodeType | GNODE |
typedef GTraits::EdgeType | GEDGE |
typedef GTraits::nodes_iterator | node_iterator |
typedef GTraits::ChildIteratorType | child_iterator |
typedef SVF::GenericGraphTraits< SVF::Inverse< GNODE * > > | InvGTraits |
Define inverse GTraits and note iterator. More... | |
typedef InvGTraits::ChildIteratorType | inv_child_iterator |
typedef FIFOWorkList< DPIm > | WorkList |
Define worklist. More... | |
Protected Member Functions inherited from SVF::LeakChecker | |
void | testsValidation (const ProgSlice *slice) |
Validate test cases for regression test purpose. More... | |
void | validateSuccessTests (const SVFGNode *source, const SVFFunction *fun) |
void | validateExpectedFailureTests (const SVFGNode *source, const SVFFunction *fun) |
void | addSrcToCSID (const SVFGNode *src, const CallICFGNode *cs) |
Record a source to its callsite. More... | |
const CallICFGNode * | getSrcCSID (const SVFGNode *src) |
Protected Member Functions inherited from SVF::SrcSnkDDA | |
void | FWProcessCurNode (const DPIm &item) override |
Forward traverse. More... | |
void | BWProcessCurNode (const DPIm &item) override |
Backward traverse. More... | |
void | FWProcessOutgoingEdge (const DPIm &item, SVFGEdge *edge) override |
Propagate information forward by matching context. More... | |
void | BWProcessIncomingEdge (const DPIm &item, SVFGEdge *edge) override |
Propagate information backward without matching context, as forward analysis already did it. More... | |
bool | forwardVisited (const SVFGNode *node, const DPIm &item) |
Whether has been visited or not, in order to avoid recursion on SVFG. More... | |
void | addForwardVisited (const SVFGNode *node, const DPIm &item) |
bool | backwardVisited (const SVFGNode *node) |
void | addBackwardVisited (const SVFGNode *node) |
void | clearVisitedMap () |
virtual bool | isAllPathReachable () |
Whether it is all path reachable from a source. More... | |
virtual bool | isSomePathReachable () |
Whether it is some path reachable from a source. More... | |
void | dumpSlices () |
Dump SVFG with annotated slice information. More... | |
void | annotateSlice (ProgSlice *slice) |
void | printZ3Stat () |
Protected Member Functions inherited from SVF::GraphReachSolver< GraphType, DPIm > | |
GraphReachSolver () | |
Constructor. More... | |
virtual | ~GraphReachSolver () |
Destructor. More... | |
const GraphType | graph () const |
Get/Set graph methods. More... | |
void | setGraph (GraphType g) |
GNODE * | getNode (NodeID id) const |
virtual NodeID | getNodeIDFromItem (const DPIm &item) const |
virtual void | forwardTraverse (DPIm &it) |
CFL forward traverse solve. More... | |
virtual void | backwardTraverse (DPIm &it) |
CFL forward traverse solve. More... | |
virtual void | FWProcessCurNode (const DPIm &) |
Process the DP item. More... | |
virtual void | BWProcessCurNode (const DPIm &) |
virtual void | FWProcessOutgoingEdge (const DPIm &item, GEDGE *edge) |
Propagation for the solving, to be implemented in the child class. More... | |
virtual void | BWProcessIncomingEdge (const DPIm &item, GEDGE *edge) |
DPIm | popFromWorklist () |
Worklist operations. More... | |
bool | pushIntoWorklist (DPIm &item) |
bool | isWorklistEmpty () |
bool | isInWorklist (DPIm &item) |
Protected Attributes inherited from SVF::SrcSnkDDA | |
SaberSVFGBuilder | memSSA |
SVFG * | svfg |
PTACallGraph * | callgraph |
SVFBugReport | report |
File open/close checker to check consistency of file operations
Definition at line 42 of file FileChecker.h.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Whether the function is a heap deallocator (free/release memory)
Reimplemented from SVF::LeakChecker.
Definition at line 70 of file FileChecker.h.
|
inlinevirtual |
Whether the function is a heap allocator/reallocator (allocate memory)
Reimplemented from SVF::LeakChecker.
Definition at line 65 of file FileChecker.h.
|
virtual |
Report file/close bugs.
Reimplemented from SVF::LeakChecker.
Definition at line 36 of file FileChecker.cpp.
|
inlinevirtual |
We start from here.
start analysis
Reimplemented from SVF::LeakChecker.
Definition at line 58 of file FileChecker.h.