[PATCH] D48142: [Sanitizers] Make sanitizer allocator linker-initialize compliant.

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 10:25:06 PDT 2018


alekseyshl added a comment.

In https://reviews.llvm.org/D48142#1142351, @filcab wrote:

> In https://reviews.llvm.org/D48142#1142349, @filcab wrote:
>
> > Clang still warns:
> >
> >   /Users/filcab/dev/llvm/compiler-rt/lib/asan/asan_allocator.cc:793:18: warning: declaration requires a global constructor [-Wglobal-constructors]
> >   static Allocator instance(LINKER_INITIALIZED);
> >                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >   1 warning generated.
> >
>
>
> Ah, that's the Asan allocator, which might be bringing something else on. It's probably not about this patch. Sorry for the noise.


Yep, clang warns about all of those LINKER_INITIALIZED instances, although no code ends up in the binary. Well, maybe this warning is worth investigating and improving...


Repository:
  rL LLVM

https://reviews.llvm.org/D48142





More information about the llvm-commits mailing list