AddressSanitizer Being Ported To GCC Trunk

Written by Michael Larabel in GNU on 11 October 2012 at 08:47 AM EDT. 2 Comments
GNU
GCC developers continue to work on bringing AddressSanitizer, which is part of the LLVM project, to their open-source compiler in hopes of better catching memory bugs and errors.

Google's Diego Novillo has shared that a new transitional branch has been made in the process of porting ASAN to trunk. "I have created a temporary branch to host the port of ASAN to trunk. Wei has done the initial port of the original code from Kostya. It compiles but we still do not have the runtimes (Wei is working on that)."

ASAN is the AddressSanitizer that serves as a memory error detector for C and C++ codes. AddressSanitizer is capable of detecting memory bugs such as use-after-free, heap buffer overflows, stack buffer overflows, global buffer overflows, and use-after-return. One of the benefits of AddressSanitizer over alternatives like Valgrind is that ASAN is designed to be very fast. AddressSanitizer within LLVM/Clang serves as a compiler instrumentation module in the form of an LLVM pass and then a run-time library that overrides the memory allocation functions.

Running AddressSanitizer binaries lead to a reported slowdown of about 2x, which is still faster than similar memory checking tools. GNU Compiler Collection developers have been interested in AddressSanitizer support and there's been some work previously while now it seems to finally be coming together with this transitional branch as the current code is made compatible with the latest GCC trunk, which is needed before it can be merged.

The GCC ASAN run-time also then needs to be written before it's actually useful, but Diego mentions that it should come soon.

More information on AddressSanitizer (ASAN) is available from its Google Code page.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week