https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63888

--- Comment #31 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Any progress on this?

If not, I'm considering doing:
--- libsanitizer/asan/asan_globals.cc.jj    2014-11-14 00:10:34.000000000 +0100
+++ libsanitizer/asan/asan_globals.cc    2015-02-20 11:43:33.179177767 +0100
@@ -148,7 +148,9 @@ static void RegisterGlobal(const Global
   CHECK(AddrIsInMem(g->beg));
   CHECK(AddrIsAlignedByGranularity(g->beg));
   CHECK(AddrIsAlignedByGranularity(g->size_with_redzone));
-  if (flags()->detect_odr_violation) {
+  // This "ODR violation" detection is fundamentally incompatible with
+  // how GCC registers globals.  Disable as useless until rewritten upstream.
+  if (0 && flags()->detect_odr_violation) {
     // Try detecting ODR (One Definition Rule) violation, i.e. the situation
     // where two globals with the same name are defined in different modules.
     if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) {
for now.

Reply via email to