Static Value-Flow Analysis
|
#include <SaberSVFGBuilder.h>
Public Types | |
typedef Set< const SVFGNode * > | SVFGNodeSet |
typedef Map< NodeID, PointsTo > | NodeToPTSSMap |
typedef FIFOWorkList< NodeID > | WorkList |
Public Types inherited from SVF::SVFGBuilder | |
typedef PointerAnalysis::CallSiteSet | CallSiteSet |
typedef PointerAnalysis::CallEdgeMap | CallEdgeMap |
typedef PointerAnalysis::FunctionSet | FunctionSet |
typedef SVFG::SVFGEdgeSetTy | SVFGEdgeSet |
Public Member Functions | |
SaberSVFGBuilder () | |
Constructor. | |
virtual | ~SaberSVFGBuilder () |
Destructor. | |
bool | isGlobalSVFGNode (const SVFGNode *node) const |
void | addActualParmVFGNode (const PAGNode *pagNode, const CallICFGNode *cs) |
Add ActualParmVFGNode. | |
void | setSaberCondAllocator (SaberCondAllocator *allocator) |
Public Member Functions inherited from SVF::SVFGBuilder | |
SVFGBuilder (bool _SVFGWithIndCall=false) | |
Constructor. | |
virtual | ~SVFGBuilder ()=default |
Destructor. | |
SVFG * | buildPTROnlySVFG (BVDataPTAImpl *pta) |
SVFG * | buildFullSVFG (BVDataPTAImpl *pta) |
SVFG * | getSVFG () const |
Get SVFG instance. | |
void | markValidVFEdge (SVFGEdgeSet &edges) |
Mark feasible VF edge by removing it from set vfEdgesAtIndCallSite. | |
bool | isSpuriousVFEdgeAtIndCallSite (const SVFGEdge *edge) |
Return true if this is an VF Edge pre-connected by Andersen's analysis. | |
virtual std::unique_ptr< MemSSA > | buildMSSA (BVDataPTAImpl *pta, bool ptrOnlyMSSA) |
Build Memory SSA. | |
Protected Member Functions | |
virtual void | buildSVFG () |
Re-write create SVFG method. | |
bool | isStrongUpdate (const SVFGNode *node, NodeID &singleton, BVDataPTAImpl *pta) |
Return TRUE if this is a strong update STORE statement. | |
void | rmDerefDirSVFGEdges (BVDataPTAImpl *pta) |
virtual void | rmIncomingEdgeForSUStore (BVDataPTAImpl *pta) |
virtual void | AddExtActualParmSVFGNodes (PTACallGraph *callgraph) |
Add actual parameter SVFGNode for 1st argument of a deallocation like external function. | |
void | collectGlobals (BVDataPTAImpl *pta) |
bool | accessGlobal (BVDataPTAImpl *pta, const PAGNode *pagNode) |
Whether points-to of a PAGNode points-to global variable. | |
PointsTo & | CollectPtsChain (BVDataPTAImpl *pta, NodeID id, NodeToPTSSMap &cachedPtsMap) |
Collect objects along points-to chains. | |
Protected Member Functions inherited from SVF::SVFGBuilder | |
SVFG * | build (BVDataPTAImpl *pta, VFG::VFGK kind) |
Create a DDA SVFG. By default actualOut and FormalIN are removed, unless withAOFI is set true. | |
virtual void | releaseMemory () |
Release global SVFG. | |
Protected Attributes | |
PointsTo | globs |
SVFGNodeSet | globSVFGNodes |
Store all global SVFG nodes. | |
SaberCondAllocator * | saberCondAllocator |
Protected Attributes inherited from SVF::SVFGBuilder | |
SVFGEdgeSet | vfEdgesAtIndCallSite |
SVFG Edges connected at indirect call/ret sites. | |
std::unique_ptr< SVFG > | svfg |
bool | SVFGWithIndCall |
SVFG with precomputed indirect call edges. | |
Definition at line 43 of file SaberSVFGBuilder.h.
Definition at line 48 of file SaberSVFGBuilder.h.
Definition at line 47 of file SaberSVFGBuilder.h.
Definition at line 49 of file SaberSVFGBuilder.h.
|
inline |
Constructor.
Definition at line 52 of file SaberSVFGBuilder.h.
|
inlinevirtual |
|
protected |
Whether points-to of a PAGNode points-to global variable.
Decide whether the node and its points-to contains a global objects
Definition at line 168 of file SaberSVFGBuilder.cpp.
|
inline |
|
protectedvirtual |
Add actual parameter SVFGNode for 1st argument of a deallocation like external function.
Add actual parameter SVFGNode for 1st argument of a deallocation like external function In order to path sensitive leak detection
Definition at line 292 of file SaberSVFGBuilder.cpp.
|
protectedvirtual |
Re-write create SVFG method.
Reimplemented from SVF::SVFGBuilder.
Reimplemented in SVF::CFLSVFGBuilder.
Definition at line 41 of file SaberSVFGBuilder.cpp.
|
protected |
Collect memory pointed global pointers, note that this collection is recursively performed, for example gp-->obj-->obj' obj and obj' are both considered global memory
Recursively collect global memory objects
Definition at line 70 of file SaberSVFGBuilder.cpp.
|
protected |
Collect objects along points-to chains.
Definition at line 120 of file SaberSVFGBuilder.cpp.
Definition at line 57 of file SaberSVFGBuilder.h.
|
protected |
Return TRUE if this is a strong update STORE statement.
Return TRUE if this is a strong update STORE statement.
Find the unique element in cpts
Definition at line 222 of file SaberSVFGBuilder.cpp.
|
protected |
Remove direct value-flow edge to a dereference point for Saber source-sink memory error detection for example, given two statements: p = alloc; q = *p, the direct SVFG edge between them is deleted Because those edges only stand for values used at the dereference points but they can not pass the value to other definitions
for store, connect the RHS/LHS pointer to its def
Definition at line 178 of file SaberSVFGBuilder.cpp.
|
protectedvirtual |
Remove Incoming Edge for strong-update (SU) store instruction Because the SU node does not receive indirect value
Remove Incoming Edge for strong-update (SU) store instruction Because the SU node does not receive indirect value
e.g., L1: *p = O; (singleton) L2: *p = _; (SU here) We should remove the indirect value flow L1 -> L2 Because the points-to set of O from L1 does not pass to that after L2
Reimplemented in SVF::CFLSVFGBuilder.
Definition at line 256 of file SaberSVFGBuilder.cpp.
|
inline |
Definition at line 68 of file SaberSVFGBuilder.h.
|
protected |
Definition at line 105 of file SaberSVFGBuilder.h.
|
protected |
Store all global SVFG nodes.
Definition at line 107 of file SaberSVFGBuilder.h.
|
protected |
Definition at line 109 of file SaberSVFGBuilder.h.