joxeankoret / diaphora

Diaphora, the most advanced Free and Open Source program diffing tool.
http://diaphora.re
GNU Affero General Public License v3.0
3.66k stars 373 forks source link

TypeError: in method `'treeloc_t_itp_set'`, argument 2 of type `'item_preciser_t'` #269

Closed enovella closed 1 year ago

enovella commented 1 year ago

Issue

While diffing two binaries, there is a repetitive Python exception thrown. Unsure how this affects to the diffing

[Diaphora: Thu Sep 14 16:25:15 2023] Error importing item: in method 'treeloc_t_itp_set', argument 2 of type 'item_preciser_t'
Traceback (most recent call last):
  File "~/diaphora-3.1\diaphora_ida.py", line 2043, in import_instruction_level
    self.do_import_instruction_level_item(
  File "~/diaphora-3.1\diaphora_ida.py", line 1957, in do_import_instruction_level_item
    self.import_instruction(matched_syms[ea2], import_syms[ea1])
  File "~/diaphora-3.1\diaphora_ida.py", line 1847, in import_instruction
    tl.itp = mitp
TypeError: in method 'treeloc_t_itp_set', argument 2 of type 'item_preciser_t'

Sample

FYI - They use the same SDK but they are not the same app with different version. samples.zip

joxeankoret commented 1 year ago

I'm trying to reproduce it today. Hopefully I can get it fixed today too.

PS: In opposite to what many people think, Diaphora is not specific to see the differences between two different versions of the same binaries. Diaphora is designed to find the similarities of 2 binaries, whatever they are, like, for example, a library and a binary with that library statically linked inside or, as it's the case with this issue, two binaries sharing the same SDK.

joxeankoret commented 1 year ago

And fixed, thanks for reporting! Feel free to reopen if you experience it again.