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

Error While running Jakstab on simple hello world program compiled in Ubuntu 16.04 machine #9

Open
bernardnongpoh opened this issue Dec 11, 2017 · 7 comments

Comments

@bernardnongpoh
Copy link

Exception in thread "main" java.lang.AssertionError
at org.jakstab.loader.elf.ELFModule.(ELFModule.java:120)
at org.jakstab.Program.loadModule(Program.java:145)
at org.jakstab.Program.loadMainModule(Program.java:116)
at org.jakstab.Main.main(Main.java:115)

@tpetersonkth
Copy link

I encountered the same problem. From my brief study of the code throwing the exception, it seems like the problem occurs because Jakstab assumes that the ELF binary must have a .dynamic and .plt section. However, not all ELF binaries have these section.

@jkinder jkinder closed this as completed Dec 10, 2019
@1Husin-Alhaj
Copy link

1Husin-Alhaj commented Oct 20, 2020

this issue is closed without providing any solution for the given problem!!!

@jkinder jkinder reopened this Oct 20, 2020
@jkinder
Copy link
Owner

jkinder commented Oct 20, 2020

Fair - the problem persists. Feel free to submit a PR fixing it.

@1Husin-Alhaj
Copy link

1Husin-Alhaj commented Oct 20, 2020

I have faced the same problem and I compiled a very tiny and simple c code file in Ubuntu using multiple ways but I always got the same error:

image

I tried to extract CFG for executable file, shared file, and object file ... but none of them worked

@jkinder
Copy link
Owner

jkinder commented Oct 20, 2020

@tpetersonkth seems to have pinpointed the issue in his comment above. You can try fixing it following the lead in his comment.

@tpetersonkth
Copy link

tpetersonkth commented Nov 2, 2020

@1Husin-Alhaj The version of Jakstab I used is available here: https://github.com/tpetersonkth/AlternatingControlFlowReconstruction/ in the Jakstab folder. This version is not much different from Kinder's version except that it adds under-approximation possibilities through extra command line options. I think the only fixes I did for this issue was to comment out some code in the ELFModule file. I am pretty sure that I did not do a proper fix though, that's why I didn't try to patch the official project. The changes made it work for binaries which didn't contain the missing sections mentioned in the error message.

You can try to see my changes in the ELFModule file or you can try to run the modified jakstab version I linked on your binaries directly. I think it should work.

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

4 participants