[llvm] r198018 - [ASan] Fix the test for __asan_gen_ globals and actually fix http://llvm.org/bugs/show_bug.cgi?id=17976

Bill Wendling isanbard at gmail.com
Thu Jan 2 03:12:38 PST 2014


Not that I know of. I think Nick is the documentation. :-)

-bw

On Dec 28, 2013, at 11:42 PM, Alexander Potapenko <glider at google.com> wrote:

> This is still some kind of magic for me, since I can't refer to anything (even the LangRef) but Nick's comment. Is that stuff documented anywhere?
> 
> On Dec 29, 2013 7:23 AM, "Bill Wendling" <isanbard at gmail.com> wrote:
> Thanks, Alexander. And sorry for creating this the long-standing issue. :-(
> 
> -bw
> 
> On Dec 25, 2013, at 8:46 AM, Alexander Potapenko <glider at google.com> wrote:
> 
> > Author: glider
> > Date: Wed Dec 25 10:46:27 2013
> > New Revision: 198018
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=198018&view=rev
> > Log:
> > [ASan] Fix the test for __asan_gen_ globals and actually fix http://llvm.org/bugs/show_bug.cgi?id=17976
> > by setting the correct linkage (as stated in the bug).
> >
> > Modified:
> >    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
> >
> > Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=198018&r1=198017&r2=198018&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed Dec 25 10:46:27 2013
> > @@ -562,13 +562,13 @@ static GlobalVariable *createPrivateGlob
> >     Module &M, StringRef Str, bool AllowMerging) {
> >   Constant *StrConst = ConstantDataArray::getString(M.getContext(), Str);
> >   // For module-local strings that can be merged with another one we set the
> > -  // internal linkage and the unnamed_addr attribute.
> > +  // private linkage and the unnamed_addr attribute.
> >   // Non-mergeable strings are made linker_private to remove them from the
> >   // symbol table. "private" linkage doesn't work for Darwin, where the
> >   // "L"-prefixed globals  end up in __TEXT,__const section
> >   // (see http://llvm.org/bugs/show_bug.cgi?id=17976 for more info).
> >   GlobalValue::LinkageTypes linkage =
> > -      AllowMerging ? GlobalValue::InternalLinkage
> > +      AllowMerging ? GlobalValue::PrivateLinkage
> >                    : GlobalValue::LinkerPrivateLinkage;
> >   GlobalVariable *GV =
> >       new GlobalVariable(M, StrConst->getType(), true,
> >
> >
> > _______________________________________________
> > 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/20140102/25cad8ee/attachment.html>


More information about the llvm-commits mailing list