Skip to content
Snippets Groups Projects
Commit c8746d8e authored by jdh8d's avatar jdh8d
Browse files

elided fallthroughs to nonce locs

Former-commit-id: 34833d957693d5d70c6463d324949213a84b7230
parent 177358bb
No related branches found
No related tags found
No related merge requests found
......@@ -298,6 +298,19 @@ bool SCFI_Instrument::mark_targets()
Instruction_t* insn=*it;
if(insn->GetIndirectBranchTargetAddress())
{
// make sure there are no fallthroughs to nonces.
for(InstructionSet_t::iterator pred_it=preds[insn].begin(); pred_it!=preds[insn].end(); ++pred_it)
{
Instruction_t* the_pred=*pred_it;
if(the_pred->GetFallthrough()==insn)
{
Instruction_t* jmp=addNewAssembly(firp,NULL, "jmp 0x0");
the_pred->SetFallthrough(jmp);
jmp->SetTarget(insn);
}
}
ind_targets++;
string type;
if(do_coloring)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment