Skip to content

TaintAnalysis

Taint Flow Analysis

Synopsis

Declared in <src/midend/programAnalysis/genericDataflow/simpleAnalyses/taintAnalysis.h>

class TaintAnalysis
    : public IntraFWDataflow

Base Classes

Name Description
IntraFWDataflow

Member Functions

Name Description
TaintAnalysis
TaintAnalysis(LiveDeadVarsAnalysis* ldv_analysis); [constructor]
Construct from LiveDeadVarsAnalysis
genInitState
virtual void genInitState( Function const& func, VirtualCFG::DataflowNode const& node, NodeState const& state, std::vector<Lattice*>& initLattices, std::vector<NodeFact*>& initFacts); [virtual]
Generate initial lattice state. Generates the initial lattice state for the given dataflow node, in the given function, with the given node state.
get_debug
std::ostream* get_debug() const;
Accessor for debug settings. If a non-null output stream is supplied, then debugging information will be sent to that stream; otherwise debugging information is suppressed. Debugging is disabled by default. @{
set_debug
void set_debug(std::ostream* os);
transfer
virtual bool transfer( Function const& func, VirtualCFG::DataflowNode const& node_, NodeState& state, std::vector<Lattice*> const& dfInfo); [virtual]
Adjust a result vertex pointer. This function has an opportunity to adjust the result lattice vertex pointer based on input lattice vertices at a particular AST node at a particular time in the data flow. For instance, if the AST node is an SgAddOp binry operation then we can obtain the vertices to which the two operands point (say, VERTEX_TAINTED and VERTEX_UNTAINTED) and adjust the result so it points to a particular vertex (say, VERTEX_TAINTED).

Protected Member Functions

Name Description
magic_tainted
bool magic_tainted( SgNode* node, FiniteVarsExprsProductLattice* prodLat);
Make certain variables always tainted.

Protected Static Member Functions

Name Description
lattice_info
static std::string lattice_info(TaintLattice const* lattice);
Helps print lattice pointers. Like std::cout <<"lhs lattice is " <<lattice_info(lhs) <<"n". Convenient because the live/dead analysis causes some lattices to be missing (null).

Protected Data Members

Name
debug
ldv_analysis

Created with MrDocs