[llvm-commits] [PATCH] Add a known bounds optimization to ASan

Ott Tinn llvm at otinn.com
Tue Oct 9 04:13:56 PDT 2012


Hi,

The attached patches add an optimization to ASan that makes it avoid
adding run-time checks to memory accesses that are always in bounds of
valid (not deallocated) memory objects. The current version works on
simple allocas, global variables, and byval arguments using the
ScalarEvolution analysis.

The included lit tests should work without the Clang patch but some of
the existing ASan tests would fail without it.

The ScalarEvolution and DataLayout complications seem to be caused by
a module pass (AddressSanitizer) requiring a function pass
(ScalarEvolution) which in turn wants to use an immutable pass
(DataLayout).

Rietveld review link: http://codereview.appspot.com/6633047/#ps1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-known-bounds-opt-llvm.patch
Type: application/octet-stream
Size: 66997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121009/3e985251/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-known-bounds-opt-clang.patch
Type: application/octet-stream
Size: 868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121009/3e985251/attachment-0001.obj>


More information about the llvm-commits mailing list