eurecom-s3 / symcc

SymCC: efficient compiler-based symbolic execution

Home Page:http://www.s3.eurecom.fr/tools/symbolic_execution/symcc.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust support

jrmuizel opened this issue · comments

This would be really nice to have.

We think so too :) There's someone currently looking into it - we'll keep you posted.

Thanks for sharing @unseddd! In our initial work, we went for the first approach. While getting SymCC added to upstream LLVM would allow a cleaner solution and make it easier for people to use SymCC in general, a lot of continued effort would be required to keep up with LLVM's pace of development and to provide high-quality support for all its targets.

I'm trying to find the time to finish the work on Rust support from where the student left off... He was able to include the SymCC pass into the LLVM version that rustc uses, and we determined that we'd need the stage-0 compiler and the stage-1 libraries, as you said. Finally, we'd have to make sure that the new compiler links or compiles SymCC's libSymRuntime into binaries.

I can't guarantee how long-term I can provide development and support (future being uncertain), but I want to get more involved with LLVM development. Willing to experiment with adding a symbolize pass in-tree. llvm/lib/Transforms/Instrumentation seems like a good place for smth like a SymbolizePass.cpp to live, what do you think?

Yes, I agree. And for the custom build of rustc and its LLVM I think it's easiest to compile SymCC in-tree anyway, so that we avoid the challenges around locating and loading libSymbolize.so. We're building a custom version of the compiler already, so we can as well patch the SymCC pass in.

I had some success with building SymCC in Rust's LLVM tree as well, but haven't figured out how to get the codegen backend to load the libSymbolize.so library (rustc_codegen_llvm looks for static .a libs). Still working on it, though.

Maybe it's easiest to move SymCC's compiler directory into the LLVM tree. The LLVM docs suggest that the changes needed in the build system should be relatively minor.

I have some spare cycles to throw at the problem, so I'm willing to help out. Will look into how to link libSymRuntime once I get a working symbolized rustc build. Does libSymRuntime need to be linked in the rustc build, or only for binaries being tested?

That's great! As for libSymRuntime, it's only needed to execute instrumented code, not to build it. So while rustc needs to build the runtime into the executables that it creates, I don't think it will itself need to be built against it.

Wow, that's really nice! Great progress :)

Tried moving SymCC in-tree in LLVM, and using the new pass manager. Running into a linking issue, but will keep experimenting.

(Apologies for deleting previous comments, went overzealous with housekeeping)