Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are duplicate instructions emitted during control flow disassembly?

0
Posted

Why are duplicate instructions emitted during control flow disassembly?

0

When using the default display callback, or any display callback that does not perform its own instruction management, the same instruction may be disassembled multiple times. The reason for this behavior is briefly mentioned in libopdis_algo: the control-flow algorithm has a choice of storing every address it disassembles, or only branch targets. In the interest of efficiency, the latter approach is taken by default: an opdis_vma_tree_t is allocated by the control-flow function and used to track visited branch targets until disassembly is complete. This has some unfortunate consequences: • If an address has already been disassembled (e.g. via a conditional jump), and the disassembler encounters it as a subsequent instruction instead of a branch target, it will be disassembled and displayed again, along with all subsequent instructions. • Addresses visited as branch targets in one invocation of a control-flow function (such as opdis_disasm_cflow) will not be known to subsequent invocat

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123