-
Notifications
You must be signed in to change notification settings - Fork 944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some functions emitted as UNREACHABLE even when reachable/keep-unreachable-funcs is used #169
Comments
This is very likely a case when LLVM works agains us (see this comment). Our flow: This is a major problem and I added it to our roadmap. We do not really need your binary, I think this is unfortunately happening quite often. |
I did some digging, documented in #41 - these two issues are certainly the same. I could trace this back to a TODO comment in RetDec. Maybe I'll manage to figure out the data structures involved to fix this properly. |
Pull request: #388 |
* Fix #41, #169 - capstone2llvmir: Correctly import pointers with segment override * Fixed typo, converting SS segment to the correct address space * Handle both cases where segment override is relevant * Made sure that bin2llvmir knows how to convert pointers with different address spaces * Made sure that llvmir2hll can handle address space casts * Made sure all LLVMIR2BIR converters support address space casts for all the relevant scenarios * Added llvmir2hll test for address space cast handling
Comment related to this: #391 (comment). |
Code from #391 was merged to |
I’ve attempted a decompilation of an older Win32 DLL which was compiled using Visual C++ 4 and detected appropriately by RetDec. 553 of 4015 detected functions are being decompiled as UNREACHABLE. For example, this function (simple C++ object constructor):
Currently decompiles to:
This seems like it could very well be the same bug as #41, but I am not sure since RAII does not appear to be involved in all of these failures, so decided to open a separate issue.
I ran RetDec with the command
retdec-decompiler.sh -k file.dll
. I also tried with the extra--backend-no-opts
flag to rule out a backend optimiser causing the problem, with the same result.Unfortunately I don’t have the rights to upload the original binary here, but I am willing to perform additional testing. Please let me know if there is any more information that I can provide, or if you can suggest a specific area of the RetDec code which I might look into to try to find or fix the root cause myself.
Thanks for this great software!
Git revision 1db0cb6
macOS 10.12.6, Apple Clang 900.0.39.2
The text was updated successfully, but these errors were encountered: