本文整理汇总了C++中AnalysisProcessor::assignmentSpreadTaintRegImm方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisProcessor::assignmentSpreadTaintRegImm方法的具体用法?C++ AnalysisProcessor::assignmentSpreadTaintRegImm怎么用?C++ AnalysisProcessor::assignmentSpreadTaintRegImm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnalysisProcessor
的用法示例。
在下文中一共展示了AnalysisProcessor::assignmentSpreadTaintRegImm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: imm
void CallIRBuilder::imm(AnalysisProcessor &ap, Inst &inst) const {
SymbolicElement *se;
std::stringstream expr1, expr2;
uint64_t imm = this->operands[0].getValue();
uint64_t memDst = this->operands[1].getValue(); // The dst memory write
uint32_t writeSize = this->operands[1].getSize();
/* Create the SMT semantic side effect */
alignStack(inst, ap, writeSize);
/* Create the SMT semantic */
/* *RSP = Next_RIP */
expr1 << smt2lib::bv(this->nextAddress, writeSize * REG_SIZE);
/* Create the symbolic element */
se = ap.createMemSE(inst, expr1, memDst, writeSize, "Saved RIP");
/* Apply the taint */
ap.assignmentSpreadTaintMemImm(se, memDst, writeSize);
/* Create the SMT semantic */
/* RIP = imm */
expr2 << smt2lib::bv(imm, writeSize * REG_SIZE);
/* Create the symbolic element */
se = ap.createRegSE(inst, expr2, ID_RIP, REG_SIZE, "RIP");
/* Apply the taint */
ap.assignmentSpreadTaintRegImm(se, ID_RIP);
}
示例2: regImm
void MovIRBuilder::regImm(AnalysisProcessor &ap, Inst &inst) const {
SymbolicElement *se;
std::stringstream expr;
uint64_t reg = this->operands[0].getValue();
uint64_t imm = this->operands[1].getValue();
uint64_t size = this->operands[0].getSize();
/* Create the SMT semantic */
expr << smt2lib::bv(imm, size * REG_SIZE);
/* Create the symbolic element */
se = ap.createRegSE(inst, expr, reg, size);
/* Apply the taint */
ap.assignmentSpreadTaintRegImm(se, reg);
}
示例3: regImm
void MovIRBuilder::regImm(AnalysisProcessor &ap, Inst &inst) const {
SymbolicExpression *se;
smt2lib::smtAstAbstractNode *expr;
auto reg = this->operands[0].getReg();
auto regSize = this->operands[0].getReg().getSize();
auto imm = this->operands[1].getImm().getValue();
/* Create the SMT semantic */
expr = smt2lib::bv(imm, regSize * REG_SIZE);
/* Create the symbolic expression */
se = ap.createRegSE(inst, expr, reg, regSize);
/* Apply the taint */
ap.assignmentSpreadTaintRegImm(se, reg);
}