https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63888
--- Comment #39 from Yury Gribov <y.gribov at samsung dot com> --- (In reply to Jakub Jelinek from comment #36) > (In reply to Yury Gribov from comment #35) > > (In reply to Kostya Serebryany from comment #34) > > > Frankly, I am not at all motivated to do any significant surgery in the > > > llvm > > > compiler instrumentation because for me everything works fine. > > > > Hm, is this related to GCC at all? Comments mention symbol resolution rules > > (local aliases being one example), I think this is totally orthogonal to > > compiler. > > It is related to the implementation of ASAN for PIC code. > GCC registers globals through private aliases (so always registers globals > in the current shared library, no matter whether the symbol in the end is > interposed by another symbol or not), while LLVM registers globals through > their exported symbols (so if a symbol is interposed, it is registered > multiple times by multiple shared libraries). What I was trying to say was that if library references it's local symbol (via local alias or -Bsymbolic), it'll (effectively) not be instrumented which will lead to false negatives. And this is not GCC-related.