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

Failing to lift binaries #182

Open
edgankin opened this issue Sep 26, 2022 · 2 comments
Open

Failing to lift binaries #182

edgankin opened this issue Sep 26, 2022 · 2 comments

Comments

@edgankin
Copy link

I tried to lift apps that were mentioned in this paper - https://dse.in.tum.de/wp-content/uploads/2022/01/translating_x86_binaries_into_llvm_intermediate_representation.pdf.

The benchmarks used there are https://github.com/kozyraki/phoenix libraries.

However when I try to lift all binaries there I always get an assertion triggered:

llvm-mctoll: /home/eduards/llvm-project/llvm/tools/llvm-mctoll/X86/X86JumpTables.cpp:274: bool llvm::mctoll::X86MachineInstructionRaiser::raiseMachineJumpTable(): Assertion `BranchInstr.isIndirectBranch()' failed.

I tried compiling binaries both with clang and gcc, with and without optimizations, with debug information and without debug information.

Does someone has an idea what is happening here?

@bharadwajy
Copy link
Contributor

Thanks for the failure report.

Would you be able to help by providing a smaller test case out of the benchmarks along with steps you followed to reproduce the failure? I will work on a fix ASAP.

@edgankin
Copy link
Author

benchmark3.zip
Uploaded archive with source and compiled binary. The source is located in IS folder.

OS: Ubuntu 22.04

mctoll call:

./llvm-mctoll -d <path to extracted archive>/NPB/NPB3.4-OMP/bin/is.W.x -o IS.lift.ll -I /usr/include/stdio.h  -I /usr/include/ctype.h -I /usr/include/strings.h  -I /usr/include/stdlib.h -I /usr/include/errno.h -I /usr/include/math.h -I /usr/include/unistd.h -I /usr/include/sys/types.h  -I /usr/include/fcntl.h -I /usr/include/sys/file.h

bharadwajy added a commit that referenced this issue Oct 3, 2022
- Adresses failure exposed by issue #182.
- Add suport to raise PCMPGTrm instruction.
- Add tests to verify raising of newly added suport.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants