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
Hi, I tried to decompile the file you have provided and with your fix I've managed to get the same results.
In this case, RetDec decompiles functions that should not be included in the output after the decoder phase. Those functions are eliminated during decompilation but few artifacts stay present.
Here is a diff of LLVM code after decoding phase (before and after the patch): diff.txt
I've run regression tests and all passed. I think that you can open a pull request.
seviezhou
added a commit
to seviezhou/retdec
that referenced
this issue
Sep 9, 2019
Thanks for the report, this is an issue that should be fixed. I will look into your solution in #642 and decide if it is enough, or we should do some more things. This might require a more robust solution.
Deocde the following ELF file:
elf-Linux-x64-bash.zip
We get a strange function:
The problem is, if the jump target is IMPORT Type, we shouldn't decode it, if the data accidently be meaningful code, We may get the following result:
The data in
0x6d94a0
is (IDA view):Although
__strtol_internal
will become declaration by the end of Decode phase, the wrong functionfunction_ffffffffffff94e5
will remaining:It can be solved by add the following code to
Decoder::decodeJumpTarget(JumpTarget &jt)
, after line 189:And everything will be fine.
The text was updated successfully, but these errors were encountered: