-
Notifications
You must be signed in to change notification settings - Fork 123
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
Failure to raise binaries of Csmith-generated sources #166
Comments
Thanks for your interest in the project and for your question. If the input to In reality, CSmith would/could serve as a feeder of test cases for The examples you provided expose
Thanks for the bug report. I'll plan to look at them. However, if you or anyone else can help out before I get to them, I'd very much appreciate the help. |
Hi @bharadwajy. Thanks for your reply and bug confirmation. Yeah, I think I am sorry I can not help in the implementation part, but if you require more test cases that trigger different assertion failures, I would like to help and find more useful test cases (with their reduced version) to assistant debugging. Do you need such cases? If so, is it better to file a new issue for each failure or just pack them all in a decompressed file then upload it here? Best, |
Thanks @Hanseltu The more test cases we have to make the tool robust and useful, the better. I'd prefer if you can create issues one per kind of failure with sources (either C or assembly) that are as minimal as possible to help focus on the actual failure. It would also help if the sources can incorporate a way to verify the correctness of the translation. Currently the tests are set up to raise a given binary, recompile the raised IR back to x64 target. Then the output of original binary and the raised binary are compared to verify the correctness of raised IR. So, if your bug report sources can incorporate a way to output some verifiable set of results or provide some other way to verify the correctness of the raised IR, it would be very helpful. Thanks again for your offer to help. |
You are welcome @bharadwajy! I am happy I can help here! By the way, the reduced versions (reduced by Creduce) of source code are as follows: The source code of GCC
and the source code of clang
For the correctness of the translation, may I ask a further question for you? To verify the translation process, I think two fundamental requirements are needed to check it. One comes from the lifting tool itself, i.e., the transferred IR should be able to be recompiled, and aother is that we need to define what should be the correct behavior after executing the compiled/re-compiled binary. Here, we can find a way to verify the correctness in For new bug reports, I will try to continuously file new issues for them in my spare time. Thanks! Best, |
Hello, forks,
May I ask is it possible to make such a promising tool compatible with Csmith, which is a notable random program generator that is able to yield a bunch of C programs with abundant features. However, llvm-mctoll seems can not handle those programs generated by Csmith.
For example, consider the following code
Build with GCC-9 and then decompile it
Build with Clang-9 and decompile it
Here is the version of llvm-mctoll I used, running in a ubuntu18.04 Linux system.
During my simple testing, although I use the option "--no-pointers --no-packed-struct --no-volatile-pointers --no-volatiles --no-const-pointers --no-structs --no-unions --no-inline-function --max-funcs 1" to enforce Csmith to generate test programs with quite small features and only one function, it seems a large portion of these programs could make llvm-mctoll crash.
Is this the correct usage of llvm-mctoll and anything wrong from my side? If not, is it possible to make llvm-mctoll compatible with Csmith? How much effort will be taken in terms of implementation?
Thanks,
Haoxin
The text was updated successfully, but these errors were encountered: