[llvm-commits] Please review: fix conflict between AddressSanitizer and load widening (GVN)

Kostya Serebryany kcc at google.com
Mon Feb 6 13:18:57 PST 2012


Fixed both.

--kcc

On Mon, Feb 6, 2012 at 12:36 PM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Kostya,
>
> +    if (LI->getParent()->getParent()->hasFnAttr(Attribute::AddressSafety)
> &&
> +        LIOffs+NewLoadByteSize > MemLocEnd) {
>
> How about switching the order of the conditions so that the cheap test
> (LIOffs+NewLoadByteSize > MemLocEnd) is done first.  That way the more
> expensive test is only done if the cheap test passes, but not if it fails.
>
> +      // We will be reading past the location accessed by the original
> program.
> +      // While this is safe in a regular build, Address Safety analysys
> tools
> +      // may start reporting false warnings. So, do't do widening.
>
> do't -> don't
>
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120206/cb85d366/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue5630068_2001.diff
Type: text/x-patch
Size: 2855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120206/cb85d366/attachment.bin>


More information about the llvm-commits mailing list