AbstractInterpretation * ae
Owning AbstractInterpretation; provides state access.
AbstractState & getAbsState(const ICFGNode *node)
Retrieves the abstract state from the trace for a given ICFG node.
void initExtFunMap()
Initializes the external function map.
IntervalValue getStrlen(const ValVar *strValue, const ICFGNode *node)
String length in elements, excluding NUL; an unproved end is unbounded.
void handleMemcpy(const ValVar *dst, const ValVar *src, const IntervalValue &len, u32_t start_idx, const ICFGNode *node)
Core memcpy: copy len bytes from src to dst starting at dst[start_idx].
u32_t getStringElementSize(const ValVar *var, const ICFGNode *node)
Scalar integer width of the pointed-to base object; zero if unknown.
void handleExtAPI(const CallICFGNode *call)
Handles an external API call.
void handleStrncat(const CallICFGNode *call)
static bool isValidLength(const IntervalValue &len)
Check if an interval length is usable (not bottom, not unbounded).
Set< const CallICFGNode * > checkpoints
IntervalValue getStrncatLength(const CallICFGNode *call)
Elements strncat appends: min(n, strlen(src)).
friend class AbstractInterpretation
std::string strRead(const ValVar *rhs, const ICFGNode *node)
Reads a string from the abstract state.
u32_t getElementSize(const ValVar *var)
Get the byte size of each element for a pointer/array variable.
void handleMemset(const ValVar *dst, const IntervalValue &elem, const IntervalValue &len, const ICFGNode *node)
AbsExtAPI(AbstractInterpretation *ae)
Constructor for AbsExtAPI.
SVFIR * svfir
Pointer to the SVF intermediate representation.
ExtAPIType
Enumeration of external API types.
static u32_t getBoundedMinimumByteCount(const IntervalValue &len)
Return the lower bound of len, capped by the field limit.
void handleStringCopy(const CallICFGNode *call, const IntervalValue &length, const IntervalValue &start)
Write length source elements and a NUL into dst at element start.
IntervalValue getRangeLimitFromType(const SVFType *type)
Gets the range limit from a type.
ICFG * icfg
Pointer to the interprocedural control flow graph.
void handleStrcat(const CallICFGNode *call)
void handleStrcpy(const CallICFGNode *call)
IntervalValue getStringLastByte(const CallICFGNode *call, const IntervalValue &length)
Last byte offset written for length elements plus the terminator.
Map< std::string, std::function< void(const CallICFGNode *)> > func_map
Map of function names to handlers.
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map