Why are duplicate instructions emitted during control flow disassembly?
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
- Installation instructions for access control frequently refer to the reader or keypad as 26-bit Wiegand . What does 26-bit mean and is it secure?
- Software flow control: What is the advantage of using 2-character software flow control?
- What is the difference between linear and control flow disassembly?