junxzm1990 / x86-sok

132 stars 20 forks source link

How can I use other comparison scripts? #14

Closed cL0und closed 3 years ago

cL0und commented 3 years ago

Hi, It seems like some comparison script can not be used now?

For example, I would like to use compareJmpTable.py and compareCFG.py but I notice it requires me to provide block type which extract script do not collect.

I find that only a few scripts collect a little type information which seems like not enough to support the comparison I mention. image

So, How can use other comparison script?

bin2415 commented 3 years ago

Block type is initialized in extractBB.

cL0und commented 3 years ago

I see, but extractBB is just used to extract ground truth? And It seems like decompiler plugin do not set enough type information when it generate pb file.

bin2415 commented 3 years ago

I set the type of block from disassemblers here

cL0und commented 3 years ago

Oh, sorry I did not read this part of code carefully, it seems like you parse the BB type during comparison.

cL0und commented 3 years ago

I think there is an ambiguity error in the value of non-return, in the IDA script you use 0x20 as type id but in BlockUtil.py you use 0x8 as type id.

Besides, there seems like another error in the compareTailCall.py, sur_addr and suc_addr should be the same variable.