[llvm-commits] [llvm] r144933 - in /llvm/trunk: lib/Transforms/Instrumentation/AddressSanitizer.cpp test/Instrumentation/AddressSanitizer/do-not-touch-odr-global.ll

Kostya Serebryany kcc at google.com
Thu Nov 17 15:37:40 PST 2011


On Thu, Nov 17, 2011 at 3:36 PM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:

> Kostya,
>
> > --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
> (original)
> > +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu
> Nov 17 17:14:59 2011
> > @@ -448,8 +448,11 @@
> >
> >     if (!Ty->isSized()) continue;
> >     if (!G->hasInitializer()) continue;
> > -    if (GlobalVariable::mayBeOverridden(G->getLinkage()) ||
> > -        G->getLinkage() == GlobalVariable::AppendingLinkage)
> > +    // Touch only those globals that will not be defined in other
> modules.
> > +    // Don't handle ODR type linkages since other modules may be built
> w/o asan.
> > +    if (G->getLinkage() !=
> GlobalVariable::GlobalVariable::ExternalLinkage &&
> > +        G->getLinkage() !=
> GlobalVariable::GlobalVariable::PrivateLinkage &&
> > +        G->getLinkage() !=
> GlobalVariable::GlobalVariable::InternalLinkage)
> >       continue;
> >     // For now, just ignore this Alloca if the alignment is large.
> >     if (G->getAlignment() > RedzoneSize) continue;
>
> What is "GlobalVariable::GlobalVariable::"?
>
Ouch! Thanks for the post review! Will fix shortly.

--kcc

> FYI, MSVC does not accept them.
>
> ...Takumi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111117/87306023/attachment.html>


More information about the llvm-commits mailing list