Sulong is a system to execute LLVM-based languages (like C/C++) on a Java Virtual Machine. It uses the Truffle language implementation framework and Graal compiler to implement dynamic optimization. Sulong has been integrated into Oracle’s GraalVM, where it is used to implement native function interfaces for other language implementations.
Safe Sulong provides memory safety by representing allocations in the interpreted C/C++ program as Java objects. It relies on the underlying Java Virtual Machine to perform automatic checks to detect errors such as out-of-bounds accesses and use-after-free errors. Additionally, Safe Sulong supports a Lenient C execution mode, where it mitigates errors to allow execution to continue. Native Sulong represents allocations in the executed program using native memory, so that allocations can be directly passed to machine-code shared libraries. This version of Sulong is available on Github.
- Sulong, and Thanks for All the Bugs: Finding Errors in C Programs by Abstracting from the Native Execution Model (ASPLOS ‘18) describes Safe Sulong.
- Lenient Execution of C on a Java Virtual Machine: Or: How I Learned to Stop Worrying and Run the Code (ManLang ‘17) describes the Lenient C dialect.
- Bringing Low-level Languages to the JVM: Efficient Execution of LLVM IR on Truffle (VMIL ‘16) describes Native Sulong.