[LLVMdev] SAFECode Source Code Released

John Criswell criswell at uiuc.edu
Fri Nov 13 14:57:31 PST 2009


Dear LLVMers,

We are happy to announce an alpha release of the SAFECode compiler.  It 
is now available for download from the LLVM public Subversion 
repository.  SAFECode uses a set of analysis passes and program 
transformations to provide strong memory safety guarantees to C/C++ 
programs.  Specifically, the safety guarantees are:

o Array bounds checking (prevents pointers from overflowing from one 
memory object into another)
o Loads and stores only access valid memory objects
o Type safety for a subset of memory objects
o Dangling pointer errors are harmless (i.e., all safety guarantees hold 
even when dangling pointers are dereferenced)
o Sound operational semantics in the face of dangling pointer errors
o Optional dangling pointer detection (induces more overhead)

We have currently built a Valgrind-like debugging tool using SAFECode 
that prints debugging information when a memory safety error is detected 
at run-time.  While the debugging tool doesn't use all of the fancy 
tricks we developed in our research, transformed programs still run 2.8x 
faster on average than Valgrind's memcheck tool (on Mac OS X) and 24x 
faster on average than Valgrind's ptrcheck tool (on Linux).

Currently, the debugging tool does not utilize all of the results from 
the SAFECode research.  Features such as Automatic Pool Allocation and 
Inter-procedural static array bounds checking are either buggy or 
disabled.  We're working on improving the quality of the code, and we 
hope to release a "production-speed" version of SAFECode in the near future.

More information on SAFECode can be found here: 
http://safecode.cs.illinois.edu/index.html

SAFECode can be checked out from SVN using the following command:

svn co http://llvm.org/svn/llvm-project/safecode/trunk safecode

Once checked out from SVN, you can find the documentation in 
safecode/docs.  See the README file in the distribution for more details 
on documentation.

-- John T.




More information about the llvm-dev mailing list