You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instructions such as ret are being treated as if they flow into the next instruction.
Instruction::Instruction automatically sets FLAG_FLOW if next_instruction is valid. In the IDA exporter, next_instruction is chosen by looking for xrefs from the current instruction, so diverging instructions would have next_instruction == 0, which is invalid, causing FLAG_FLOW to not be set. But in the Binary Ninja exporter, we just have:
// TODO(cblichmann): Is this always the case in Binja?constAddressnext_instruction=address+instruction.length;
So it always gets set.
The code does already check for regular control flow later on, so it might be easiest to just reset FLAG_FLOW at that point:
… functions
This addresses #99 (`TYPE_SWITCH` xrefs are backwards) and #100 (diverging
instructions not being treated as such).
The plugin now goes to great lengths to figure out code references and distinguish them
from data references ([BinaryNinja API issue 3559](Vector35/binaryninja-api#3559)).
Note: I might refactor the plugin so that instead of decoding instructions one
by one, we rely on Binary Ninja's analysis and simply iterate over functions
their basic blocks.
PiperOrigin-RevId: 482437008
Change-Id: Ifb6f130dc35e1bb7df88db38ad3ea617d95b3aa8
Instructions such as
ret
are being treated as if they flow into the next instruction.Instruction::Instruction
automatically setsFLAG_FLOW
ifnext_instruction
is valid. In the IDA exporter,next_instruction
is chosen by looking for xrefs from the current instruction, so diverging instructions would havenext_instruction == 0
, which is invalid, causingFLAG_FLOW
to not be set. But in the Binary Ninja exporter, we just have:So it always gets set.
The code does already check for regular control flow later on, so it might be easiest to just reset
FLAG_FLOW
at that point:The text was updated successfully, but these errors were encountered: