[LLVMdev] load widening conflicts with AddressSanitizer

Joerg Sonnenberger joerg at britannica.bec.de
Tue Jan 24 10:04:02 PST 2012


On Tue, Jan 24, 2012 at 10:23:06AM +0100, Duncan Sands wrote:
> Hi Kostya,
> 
> > [resurrecting an old mail thread about AddressSanitizer false positive caused by
> > load widening]
> >
> > Once the Attribute::AddressSafety is set by clang (a separate patch), fixing
> > this bug may look as simple as this:
> 
> I don't get the point of an attribute.  There's plenty of code out there
> that does wide loads like this directly (without them being created by the
> optimizers) since, just like the optimizers, they know it is safe and a win.
> The attribute won't help them.  It looks like a way of just hiding the real
> problem, which seems to be that address sanitizer is overly strict.

The approach taken by valgrind is to provide a preprocessor macro, so a
validation build can disable such optional performance hacks.

Joerg



More information about the llvm-dev mailing list