[llvm-commits] AddressSanitizer, first patch

Chandler Carruth chandlerc at google.com
Tue Aug 30 13:51:14 PDT 2011


Adding Eric as this fell out of his inbox...

On Fri, Aug 19, 2011 at 11:14 AM, Kostya Serebryany <kcc at google.com> wrote:

> Hello llvm-commits,
>
> I would ask you to consider the following patch, which adds the basic
> functionality of AddressSanitizer, a memory error detector.
>
> Quick description:
>   The tool finds stack and heap out-of-bound bugs and use-after-free bugs.
>   It consists of an LLVM instrumentation pass and a run-time library which
> replaces malloc.
>   The LLVM pass instruments all memory accesses and inserts redzones around
> stack objects and globals.
>   The run-time library inserts redzones around heap objects and handles
> error reporting.
>   The slowdown introduced by the tool varies between 1.5x and 2.5x (on
> CPU2006 the average is 1.73x).
>
>   Until now the tool was developed as a separate project.
>   It has been quite successful at finding bugs for the Chromium browser
> project
>   (
> http://blog.chromium.org/2011/06/testing-chromium-addresssanitizer-fast.html
> )
>   and other pieces of Google code.
>
>   For the full description of the tool please read
>   http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
>
> http://code.google.com/p/address-sanitizer/wiki/AddressSanitizerAlgorithm
>   http://code.google.com/p/address-sanitizer/wiki/PerformanceNumbers
>
>
> This patch adds the basic instrumentation functionality (w/o stack and
> global redzones) and one test.
>
> If/when this patch is submitted, the following patches will follow:
>   clang/driver support (flags, etc)
>   stack/globals support
>   run-time librrary
>   integration tests
>
> The patch file is attached, or it can be viewed at
> http://codereview.appspot.com/4867059/
>
> Thanks,
>
> --kcc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110830/1de0d0e0/attachment.html>


More information about the llvm-commits mailing list