|
Static Value-Flow Analysis
|
Typedefs | |
| typedef struct SVF::SVFUtil::equalPointsTo | equalPointsTo |
| typedef struct SVF::SVFUtil::equalNodeBS | equalNodeBS |
| typedef OrderedSet< PointsTo, equalPointsTo > | PointsToList |
Functions | |
| template<class X , class Y > | |
| LLVM_NODISCARD bool | isa (const Y &Val) |
| template<typename First , typename Second , typename... Rest, typename Y > | |
| LLVM_NODISCARD bool | isa (const Y &Val) |
| template<class X , class Y > | |
| std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > | cast (const Y &Val) |
| template<class X , class Y > | |
| cast_retty< X, Y >::ret_type | cast (Y &Val) |
| template<class X , class Y > | |
| cast_retty< X, Y * >::ret_type | cast (Y *Val) |
| template<class X , class Y > | |
| cast_retty< X, std::unique_ptr< Y > >::ret_type | cast (std::unique_ptr< Y > &&Val) |
| template<class X , class Y > | |
| LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > | dyn_cast (const Y &Val) |
| template<class X , class Y > | |
| LLVM_NODISCARD cast_retty< X, Y >::ret_type | dyn_cast (Y &Val) |
| template<class X , class Y > | |
| LLVM_NODISCARD cast_retty< X, Y * >::ret_type | dyn_cast (Y *Val) |
| std::ostream & | outs () |
| Overwrite llvm::outs() | |
| std::ostream & | errs () |
| Overwrite llvm::errs() | |
| void | dumpSet (NodeBS To, OutStream &O=SVFUtil::outs()) |
| Dump sparse bitvector set. | |
| void | dumpSet (PointsTo To, OutStream &O=SVFUtil::outs()) |
| void | dumpPointsToSet (unsigned node, NodeBS To) |
| Dump points-to set. | |
| void | dumpSparseSet (const NodeBS &To) |
| void | dumpAliasSet (unsigned node, NodeBS To) |
| Dump alias set. | |
| std::string | sucMsg (const std::string &msg) |
| Returns successful message by converting a string into green string output. | |
| std::string | wrnMsg (const std::string &msg) |
| Returns warning message by converting a string into yellow string output. | |
| void | writeWrnMsg (const std::string &msg) |
| Writes a message run through wrnMsg. | |
| std::string | errMsg (const std::string &msg) |
| Print error message by converting a string into red string output. | |
| std::string | bugMsg1 (const std::string &msg) |
| std::string | bugMsg2 (const std::string &msg) |
| std::string | bugMsg3 (const std::string &msg) |
| std::string | pasMsg (const std::string &msg) |
| Print each pass/phase message by converting a string into blue string output. | |
| void | reportMemoryUsageKB (const std::string &infor, OutStream &O=SVFUtil::outs()) |
| Print memory usage in KB. | |
| bool | getMemoryUsageKB (u32_t *vmrss_kb, u32_t *vmsize_kb) |
| Get memory usage from system file. Return TRUE if succeed. | |
| void | increaseStackSize () |
| Increase the stack size limit. | |
| bool | fileExists (const std::string &path) |
| Check whether a file exists at the given path. | |
| std::string | getStdoutFromCommand (const std::string &command) |
| Execute a shell command and capture its stdout output. | |
| std::string | getCurrentSOPath () |
| Return the absolute path of the current module/executable. | |
| bool | cmpPts (const PointsTo &lpts, const PointsTo &rpts) |
| bool | cmpNodeBS (const NodeBS &lpts, const NodeBS &rpts) |
| void | dumpPointsToList (const PointsToList &ptl) |
| bool | isIntrinsicInst (const ICFGNode *inst) |
| Return true if it is an llvm intrinsic instruction. | |
| bool | isCallSite (const ICFGNode *inst) |
| bool | isRetInstNode (const ICFGNode *node) |
| bool | isNonInstricCallSite (const ICFGNode *inst) |
| Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls. | |
| bool | matchArgs (const CallICFGNode *cs, const FunObjVar *callee) |
| std::vector< std::string > | split (const std::string &s, char separator) |
| Split into two substrings around the first occurrence of a separator string. | |
| template<typename Data > | |
| void | mergePtsOccMaps (Map< Data, unsigned > &to, const Map< Data, unsigned > from) |
| Given a map mapping points-to sets to a count, adds from into to. | |
| std::string | hclustMethodToString (hclust_fast_methods method) |
| Returns a string representation of a hclust method. | |
| template<typename Key , typename KeySet > | |
| void | insertKey (const Key &key, KeySet &keySet) |
| Inserts an element into a Set/CondSet (with ::insert). | |
| void | insertKey (const NodeID &key, NodeBS &keySet) |
| Inserts a NodeID into a NodeBS. | |
| template<typename Key , typename KeySet > | |
| void | removeKey (const Key &key, KeySet &keySet) |
| Removes an element from a Set/CondSet (or anything implementing erase). | |
| void | removeKey (const NodeID &key, NodeBS &keySet) |
| Removes a NodeID from a NodeBS. | |
| void | timeLimitReached (int signum) |
| Function to call when alarm for time limit hits. | |
| void | startAnalysisLimitTimer (unsigned timeLimit) |
| Starts analysis timer. timeLimit must be non-0. Timer must not be already set. | |
| void | stopAnalysisLimitTimer (void) |
| Stops analysis timer. | |
| bool | isExtCall (const FunObjVar *fun) |
| bool | isHeapAllocExtFunViaRet (const FunObjVar *fun) |
| Return true if the call is a heap allocator/reallocator. | |
| bool | isHeapAllocExtFunViaArg (const FunObjVar *fun) |
| u32_t | getHeapAllocHoldingArgPosition (const FunObjVar *fun) |
| Get the position of argument that holds an allocated heap object. | |
| bool | isReallocExtFun (const FunObjVar *fun) |
| Return true if the call is a heap reallocator. | |
| bool | isProgEntryFunction (const FunObjVar *) |
| Program entry function e.g. main. | |
| const FunObjVar * | getProgFunction (const std::string &funName) |
| Get program entry function from function name. | |
| const FunObjVar * | getProgEntryFunction () |
| Get program entry function. | |
| bool | isProgExitFunction (const FunObjVar *fun) |
| Return true if this is a program exit function call. | |
| bool | isArgOfUncalledFunction (const SVFVar *svfvar) |
| const ObjVar * | getObjVarOfValVar (const ValVar *valVar) |
| const ValVar * | getForkedFun (const CallICFGNode *inst) |
| Return thread fork function. | |
| bool | isExtCall (const CallICFGNode *cs) |
| bool | isExtCall (const ICFGNode *node) |
| bool | isHeapAllocExtCallViaArg (const CallICFGNode *cs) |
| bool | isHeapAllocExtCallViaRet (const CallICFGNode *cs) |
| interfaces to be used externally | |
| bool | isHeapAllocExtCall (const ICFGNode *cs) |
| u32_t | getHeapAllocHoldingArgPosition (const CallICFGNode *cs) |
| bool | isReallocExtCall (const CallICFGNode *cs) |
| bool | isThreadForkCall (const CallICFGNode *inst) |
| bool | isThreadJoinCall (const CallICFGNode *cs) |
| bool | isThreadExitCall (const CallICFGNode *cs) |
| bool | isLockAquireCall (const CallICFGNode *cs) |
| bool | isLockReleaseCall (const CallICFGNode *cs) |
| bool | isBarrierWaitCall (const CallICFGNode *cs) |
| Return true if this is a barrier wait call. | |
| const ValVar * | getActualParmAtForkSite (const CallICFGNode *cs) |
| Return sole argument of the thread routine. | |
| bool | isProgExitCall (const CallICFGNode *cs) |
| template<typename T > | |
| constexpr std::remove_reference< T >::type && | move (T &&t) noexcept |
| std::string SVF::SVFUtil::bugMsg1 | ( | const std::string & | msg | ) |
Definition at line 103 of file SVFUtil.cpp.
| std::string SVF::SVFUtil::bugMsg2 | ( | const std::string & | msg | ) |
Definition at line 108 of file SVFUtil.cpp.
| std::string SVF::SVFUtil::bugMsg3 | ( | const std::string & | msg | ) |
Definition at line 113 of file SVFUtil.cpp.
|
inline |
|
inline |
Dump alias set.
Dump alias set
Definition at line 159 of file SVFUtil.cpp.
| void SVF::SVFUtil::dumpPointsToList | ( | const PointsToList & | ptl | ) |
| void SVF::SVFUtil::dumpSet | ( | NodeBS | bs, |
| OutStream & | O = SVFUtil::outs() |
||
| ) |
| void SVF::SVFUtil::dumpSet | ( | PointsTo | To, |
| OutStream & | O = SVFUtil::outs() |
||
| ) |
Definition at line 178 of file SVFUtil.cpp.
|
inline |
|
inline |
|
inline |
| std::string SVF::SVFUtil::errMsg | ( | const std::string & | msg | ) |
Print error message by converting a string into red string output.
print error message by converting a string into red string output
Definition at line 98 of file SVFUtil.cpp.
|
inline |
|
inline |
| std::string SVF::SVFUtil::getCurrentSOPath | ( | ) |
Return the absolute path of the current module/executable.
Definition at line 302 of file SVFUtil.cpp.
|
inline |
| u32_t SVF::SVFUtil::getHeapAllocHoldingArgPosition | ( | const CallICFGNode * | cs | ) |
Definition at line 434 of file SVFUtil.cpp.
Get memory usage from system file. Return TRUE if succeed.
Get memory usage
Definition at line 199 of file SVFUtil.cpp.
Definition at line 520 of file SVFUtil.cpp.
Get program entry function.
Get program entry function from module.
Definition at line 499 of file SVFUtil.cpp.
Get program entry function from function name.
Get program entry function from module.
Definition at line 486 of file SVFUtil.cpp.
| std::string SVF::SVFUtil::getStdoutFromCommand | ( | const std::string & | command | ) |
Execute a shell command and capture its stdout output.
Definition at line 277 of file SVFUtil.cpp.
| std::string SVF::SVFUtil::hclustMethodToString | ( | hclust_fast_methods | method | ) |
Returns a string representation of a hclust method.
Definition at line 335 of file SVFUtil.cpp.
| void SVF::SVFUtil::increaseStackSize | ( | ) |
Increase the stack size limit.
Increase stack size
Definition at line 249 of file SVFUtil.cpp.
|
inline |
Definition at line 511 of file SVFUtil.cpp.
|
inline |
Definition at line 405 of file SVFUtil.cpp.
| bool SVF::SVFUtil::isExtCall | ( | const CallICFGNode * | cs | ) |
Definition at line 423 of file SVFUtil.cpp.
Return true if the call is an external call (external library in function summary table) If the library function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
Definition at line 526 of file SVFUtil.cpp.
Definition at line 440 of file SVFUtil.cpp.
Definition at line 446 of file SVFUtil.cpp.
| bool SVF::SVFUtil::isHeapAllocExtCallViaArg | ( | const CallICFGNode * | cs | ) |
Definition at line 428 of file SVFUtil.cpp.
| bool SVF::SVFUtil::isHeapAllocExtCallViaRet | ( | const CallICFGNode * | cs | ) |
interfaces to be used externally
Definition at line 452 of file SVFUtil.cpp.
Return true if it is an llvm intrinsic instruction.
Definition at line 410 of file SVFUtil.cpp.
|
inline |
|
inline |
Program entry function e.g. main.
Return true if this is a program entry function (e.g. main)
Definition at line 531 of file SVFUtil.cpp.
| bool SVF::SVFUtil::isProgExitCall | ( | const CallICFGNode * | cs | ) |
Definition at line 480 of file SVFUtil.cpp.
Return true if this is a program exit function call.
Definition at line 473 of file SVFUtil.cpp.
| bool SVF::SVFUtil::isReallocExtCall | ( | const CallICFGNode * | cs | ) |
Definition at line 458 of file SVFUtil.cpp.
Definition at line 465 of file SVFUtil.cpp.
|
inline |
|
inline |
|
inline |
| bool SVF::SVFUtil::matchArgs | ( | const CallICFGNode * | call, |
| const FunObjVar * | callee | ||
| ) |
Match arguments for callsite at caller and callee if the arg size does not match then we do not need to connect this parameter unless the callee is a variadic function (the first parameter of variadic function is its parameter number)
Match arguments for callsite at caller and callee if the arg size does not match then we do not need to connect this parameter unless the callee is a variadic function (the first parameter of variadic function is its parameter number) e.g., void variadicFoo(int num, ...); variadicFoo(5, 1,2,3,4,5) for variadic function, callsite arg size must be greater than or equal to callee arg size
Definition at line 397 of file SVFUtil.cpp.
|
inline |
| std::string SVF::SVFUtil::pasMsg | ( | const std::string & | msg | ) |
Print each pass/phase message by converting a string into blue string output.
print each pass/phase message by converting a string into blue string output
Definition at line 121 of file SVFUtil.cpp.
| void SVF::SVFUtil::reportMemoryUsageKB | ( | const std::string & | infor, |
| OutStream & | O = SVFUtil::outs() |
||
| ) |
Print memory usage in KB.
Print memory usage
Definition at line 189 of file SVFUtil.cpp.
Split into two substrings around the first occurrence of a separator string.
Definition at line 204 of file SVFUtil.h.
| void SVF::SVFUtil::startAnalysisLimitTimer | ( | unsigned | timeLimit | ) |
Starts analysis timer. timeLimit must be non-0. Timer must not be already set.
Definition at line 364 of file SVFUtil.cpp.
| void SVF::SVFUtil::stopAnalysisLimitTimer | ( | void | ) |
Stops analysis timer.
Definition at line 383 of file SVFUtil.cpp.
| std::string SVF::SVFUtil::sucMsg | ( | const std::string & | msg | ) |
Returns successful message by converting a string into green string output.
print successful message by converting a string into green string output
Definition at line 75 of file SVFUtil.cpp.
| void SVF::SVFUtil::timeLimitReached | ( | int | signum | ) |
Function to call when alarm for time limit hits.
Definition at line 355 of file SVFUtil.cpp.
| void SVF::SVFUtil::writeWrnMsg | ( | const std::string & | msg | ) |
Writes a message run through wrnMsg.
Definition at line 88 of file SVFUtil.cpp.