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
Are you using the current master or pre-built package? It maybe have been fixed in master, but I cannot check it without the input binary. We should release a new version in a few days, so you can try it then.
Can you share the sample? If I was able to reproduce the problem, It would probably be an easy and fast fix.
If not, more precise backtrace could help - build RetDec in debug mode (-DCMAKE_BUILD_TYPE=Debug on linux, --config Debug on Windows) and re-run the gdb. Also, if you are on Linux, send a valgrind log as well.
Hi,
I'm trying to decompile a windows C++ executable and got this error:
Decompiling /root/sample.exe into /root/sample.c.backend.bc...
RUN: /usr/local/bin/retdec-bin2llvmir -provider-init -decoder -verify -main-detection -idioms-libgcc -inst-opt -register -cond-branch-opt -syscalls -stack -constants -param-return -local-vars -inst-opt -simple-types -generate-dsm -remove-asm-instrs -class-hierarchy -select-fncs -unreachable-funcs -inst-opt -value-protect -instcombine -tbaa -targetlibinfo -basicaa -domtree -simplifycfg -domtree -early-cse -lower-expect -targetlibinfo -tbaa -basicaa -globalopt -mem2reg -instcombine -simplifycfg -basiccg -domtree -early-cse -lazy-value-info -jump-threading -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -instcombine -scalar-evolution -loop-simplifycfg -loop-simplify -aa -loop-accesses -loop-load-elim -lcssa -indvars -loop-idiom -loop-deletion -memdep -gvn -memdep -sccp -instcombine -lazy-value-info -jump-threading -correlated-propagation -domtree -memdep -dse -dce -bdce -adce -die -simplifycfg -instcombine -strip-dead-prototypes -globaldce -constmerge -constprop -instnamer -domtree -instcombine -instcombine -tbaa -targetlibinfo -basicaa -domtree -simplifycfg -domtree -early-cse -lower-expect -targetlibinfo -tbaa -basicaa -globalopt -mem2reg -instcombine -simplifycfg -basiccg -domtree -early-cse -lazy-value-info -jump-threading -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -instcombine -scalar-evolution -loop-simplifycfg -loop-simplify -aa -loop-accesses -loop-load-elim -lcssa -indvars -loop-idiom -loop-deletion -memdep -gvn -memdep -sccp -instcombine -lazy-value-info -jump-threading -correlated-propagation -domtree -memdep -dse -dce -bdce -adce -die -simplifycfg -instcombine -strip-dead-prototypes -globaldce -constmerge -constprop -instnamer -domtree -instcombine -simple-types -stack-ptr-op-remove -inst-opt -idioms -global-to-local -dead-global-assign -instcombine -phi2seq -value-protect -disable-inlining -disable-simplify-libcalls -config-path /root/sample.c.json -max-memory-half-ram -o /root/sample.c.backend.bc
Running phase: Initialization ( 0.01s )
Running phase: LLVM ( 0.02s )
Running phase: Providers initialization ( 0.02s )
Running phase: Input binary to LLVM IR decoding ( 0.85s )
/usr/local/bin/retdec-decompiler.sh: line 1264: 4127 Segmentation fault "$BIN2LLVMIR" "${BIN2LLVMIR_PARAMS[@]}" -o "$OUT_BACKEND_BC"
Error: Decompilation to LLVM IR failed
Tried to run from gdb for backtrace:
Running phase: Initialization ( 0.01s )
Running phase: LLVM ( 0.02s )
Running phase: Providers initialization ( 0.02s )
Running phase: Input binary to LLVM IR decoding ( 0.86s )
Program received signal SIGSEGV, Segmentation fault.
0x000055555596d7fb in cs_disasm_iter ()
(gdb) bt
#0 0x000055555596d7fb in cs_disasm_iter ()
#1 0x000055555595370d in retdec::capstone2llvmir::Capstone2LlvmIrTranslator_impl<cs_x86, cs_x86_op>::translateOne(unsigned char const*&, unsigned long&, retdec::utils::Address&, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) ()
#2 0x00005555557e71a7 in retdec::bin2llvmir::Decoder::translate(std::pair<unsigned char const*, unsigned long>&, retdec::utils::Address&, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) ()
#3 0x00005555557eb670 in retdec::bin2llvmir::Decoder::decodeJumpTarget(retdec::bin2llvmir::JumpTarget const&) ()
#4 0x00005555557ebd9b in retdec::bin2llvmir::Decoder::decode() ()
#5 0x00005555557ec32d in retdec::bin2llvmir::Decoder::runOnModule(llvm::Module&) ()
#6 0x0000555556216e24 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#7 0x0000555555788dc0 in _main(int, char**) ()
#8 0x0000555555641aa6 in main ()
The text was updated successfully, but these errors were encountered: