30 #ifndef LEAKCHECKER_H_
31 #define LEAKCHECKER_H_
112 assert(it!=
srcToCSIDMap.end() &&
"source node not at a callsite??");
void validateSuccessTests(const SVFGNode *source, const SVFFunction *fun)
void addSrcToCSID(const SVFGNode *src, const CallICFGNode *cs)
Record a source to its callsite.
virtual bool runOnModule(SVFIR *pag)
We start from here.
virtual ~LeakChecker()
Destructor.
virtual void initSrcs() override
Initialize sources and sinks.
virtual void initSnks() override
SVFGNodeToCSIDMap srcToCSIDMap
const CallICFGNode * getSrcCSID(const SVFGNode *src)
Map< const SVFGNode *, const CallICFGNode * > SVFGNodeToCSIDMap
FIFOWorkList< const CallICFGNode * > CSWorkList
virtual bool isSinkLikeFun(const SVFFunction *fun) override
Whether the function is a heap deallocator (free/release memory)
virtual void reportBug(ProgSlice *slice) override
Report leaks.
void testsValidation(const ProgSlice *slice)
Validate test cases for regression test purpose.
void validateExpectedFailureTests(const SVFGNode *source, const SVFFunction *fun)
LeakChecker()
Constructor.
ProgSlice::VFWorkList WorkList
virtual bool isSourceLikeFun(const SVFFunction *fun) override
Whether the function is a heap allocator/reallocator (allocate memory)
bool isMemAlloc(const SVFFunction *fun) const
Return true if this call is a memory allocation.
bool isMemDealloc(const SVFFunction *fun) const
Return true if this call is a memory deallocation.
static SaberCheckerAPI * getCheckerAPI()
Return a static reference.
virtual void analyze(SVFModule *module)
Start analysis here.
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map