joxeankoret / diaphora

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

ignore offset changes #213

Closed liettua closed 3 years ago

liettua commented 3 years ago

how can i ignore the offset changes, but keep other small changes.

so basically if a function contains offset changes, ignore it and treat it as same thing

circled in red here:

https://imgur.com/a/RmZagIw

the used relaxed calculations function ignores too much

joxeankoret commented 3 years ago

The problem is that it isn't just an offsets change, it is effectively a names change, this is why relaxed calculations here doesn't help.

liettua commented 3 years ago

The problem is that it isn't just an offsets change, it is effectively a names change, this is why relaxed calculations here doesn't help.

oh so there is nothing i could do about this ?

joxeankoret commented 3 years ago

Yes, there is: writing a script for it. You can write a script to be used with Diaphora that changes how are global variable names exported. Or you can add your own specific SQL heuristic. Or you can modify the way similarity ratios are calculated. Take a look to these 2 scripts:

https://github.com/joxeankoret/diaphora/blob/master/hooks/hooks_example1.py https://github.com/joxeankoret/diaphora/blob/master/hooks/hooks_example2.py

liettua commented 3 years ago

okay thank you