Skip to content
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

decompile fails with: Global variable initializer type does not match global variable type #436

Closed
fesc2000 opened this issue Dec 1, 2018 · 5 comments

Comments

@fesc2000
Copy link

fesc2000 commented Dec 1, 2018

The mentioned error happens during
...
Running phase: Assembly Writer ( 14.24s )

There are several references to this error in https://github.com/ldc-developers. Could this come from outdated llvm code?

log.txt

@s3rvac
Copy link
Member

s3rvac commented Dec 1, 2018

Hi. Could you please attach the input binary file that you are trying to decompile?

@fesc2000
Copy link
Author

fesc2000 commented Dec 1, 2018

Here it comes:

ci.zip

@s3rvac
Copy link
Member

s3rvac commented Dec 1, 2018

Thank you for the report. I can confirm that there is indeed an issue when decompiling the file you have attached. On the current master, the debug version of RetDec fails with the following error:

Running phase: Constants optimization ( 6.36s )
While deleting: i32* %global_var_806da00
Use still stuck around after Def is destroyed:@global_var_806dbb0.481 = global i32* @global_var_806da00
retdec-bin2llvmir: build/external/src/llvm-project/lib/IR/Value.cpp:85: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.
Error: Decompilation to LLVM IR failed

@PeterMatula, could you please take a look?

@PeterMatula PeterMatula self-assigned this Jan 2, 2019
@PeterMatula
Copy link
Collaborator

The binary was added to our internal tests, since in this case we don't need to check the output quality but only that the decompilation succeeds.

@fesc2000
Copy link
Author

fesc2000 commented Feb 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants